String
-
Add support for strings style with
See moreStringStyle
constants.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) throws
Parameters
path
The location of file.
-
Writes this string to file on path.
Declaration
Parameters
path
The location to which to write this string.
append
Appends the string to the end of file.
useAuxiliaryFile
If
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.targetEncoding
The encoding in which the string should be interpreted.
Return Value
The path to allow chaining.