String
-
Add support for strings style with
See moreStringStyleconstants.Declaration
Swift
public extension String.StringInterpolation
-
Creates an instance initialized to the given string value.
Do not call this initializer directly. It is used by the
CLI.ask(_:options:)andCLI.choose(_:choices:)functions.Declaration
Swift
@inlinable public init?(stringArgument arg: String)
-
Creates a string with the content of the file at the given path.
Declaration
Swift
@inlinable init(contentsOf path: Path) throwsParameters
pathThe location of file.
-
Writes this string to file on path.
Declaration
Parameters
pathThe location to which to write this string.
appendAppends the string to the end of file.
useAuxiliaryFileIf
true, the string is written to a backup location, and then the backup location is renamed to the name specified by path; otherwise, the data is written directly to path.targetEncodingThe encoding in which the string should be interpreted.
Return Value
The path to allow chaining.
View on GitHub
String Extension Reference