Initializerswift 6.0.1Swift
init(unicodeScalarLiteral:)
Creates an instance initialized to a single Unicode scalar.
init(unicodeScalarLiteral value: StaticString)
Do not call this initializer directly. It may be used by the compiler when you initialize a static string with a Unicode scalar.
Other members in extension
Type members
init(
) Creates an empty static string.
init(extendedGraphemeClusterLiteral: StaticString
) Creates an instance initialized to a single character that is made up of one or more Unicode scalar values.
init(stringLiteral: StaticString
) Creates an instance initialized to the value of a string literal.
Instance members
var customMirror: Mirror
var debugDescription: String
A textual representation of the static string, suitable for debugging.
var description: String
A textual representation of the static string.
var hasPointerRepresentation: Bool
A Boolean value that indicates whether the static string stores a pointer to a null-terminated sequence of UTF-8 code units.
var isASCII: Bool
A Boolean value that indicates whether the static string represents only ASCII code units (or an ASCII scalar value).
var unicodeScalar: Unicode.Scalar
A single Unicode scalar value.
var utf8CodeUnitCount: Int
The number of UTF-8 code units (excluding the null terminator).
var utf8Start: UnsafePointer<UInt8>
A pointer to a null-terminated sequence of UTF-8 code units.
func withUTF8Buffer<R>((UnsafeBufferPointer<UInt8>) -> R
) -> R Invokes the given closure with a buffer containing the static string’s UTF-8 code unit sequence (excluding the null terminator).