EnumerationOptions
You’re reading documentation from an older version of Swift 6.1.
A symbol with the same signature as this one exists in the latest stable release of Swift 6.1.
typealias EnumerationOptions = NSString.EnumerationOptionsYou’re reading documentation from an older version of Swift 6.1.
A symbol with the same signature as this one exists in the latest stable release of Swift 6.1.
typealias EnumerationOptions = NSString.EnumerationOptionsimport Swiftimport Foundation@frozen struct StringA Unicode string value that is a collection of characters.
class NSStringstruct EnumerationOptionsinit(_ cocoaString: NSString) init?(cString: UnsafePointer<CChar>, encoding enc: String.Encoding) Produces a string by copying the null-terminated bytes in a given C array, interpreted according to a given encoding.
init?(cString: [CChar], encoding enc: String.Encoding) Produces a string by copying the null-terminated bytes in a given array, interpreted according to a given encoding.
init(format: String, _ arguments: any CVarArg...) Returns a String object initialized by using a given format string as a template into which the remaining argument values are substituted.
init(format: String, arguments: [any CVarArg]) Returns a String object initialized by using a given format string as a template into which the remaining argument values are substituted according to the user’s default locale.
init(format: String, locale: Locale?, _ args: any CVarArg...) Returns a String object initialized by using a given format string as a template into which the remaining argument values are substituted according to given locale information.
init(format: String, locale: Locale?, arguments: [any CVarArg]) Returns a String object initialized by using a given format string as a template into which the remaining argument values are substituted according to given locale information.
init(utf16CodeUnits: UnsafePointer<unichar>, count: Int) Creates a new string that contains the specified number of characters from the given C array of Unicode characters.
init?(utf8String bytes: UnsafePointer<CChar>) Creates a string by copying the data from a given null-terminated C array of UTF8-encoded bytes.
init?(utf8String bytes: [CChar]) Creates a string by copying the data from a given null-terminated array of UTF8-encoded bytes.
static var availableStringEncodings: [String.Encoding] { get }An array of the encodings that strings support in the application’s environment.
static var defaultCStringEncoding: String.Encoding { get }The C-string encoding assumed for any method accepting a C string as an argument.
static func localizedName(of encoding: String.Encoding) -> String Returns a human-readable string giving the name of the specified encoding.
static func localizedStringWithFormat(_ format: String, _ arguments: any CVarArg...) -> String Returns a string created by using a given format string as a template into which the remaining argument values are substituted according to the user’s default locale.
typealias EncodingConversionOptions = NSString.EncodingConversionOptionsinit?(bytesNoCopy bytes: UnsafeMutableRawPointer, length: Int, encoding: String.Encoding, freeWhenDone flag: Bool) Creates a new string that contains the specified number of bytes from the given buffer, interpreted in the specified encoding, and optionally frees the buffer.
init?(cString: String, encoding enc: String.Encoding) init?(cString: inout CChar, encoding enc: String.Encoding) init(contentsOf url: URL) throws init(contentsOfFile path: String) throws init(utf16CodeUnitsNoCopy: UnsafePointer<unichar>, count: Int, freeWhenDone flag: Bool) Creates a new string that contains the specified number of characters from the given C array of UTF-16 code units.
init?(utf8String bytes: String) init?(utf8String bytes: inout CChar)