Type Aliasswift 6.0.1Swift
UTF8View
A view of a character’s contents as a collection of UTF-8 code units. See String.UTF8View for more information
typealias UTF8View = String.UTF8View
Other members in extension
Typealiases
typealias UTF16View
A view of a character’s contents as a collection of UTF-16 code units. See String.UTF16View for more information
typealias UnicodeScalarView
Type members
init(String
) Creates a character from a single-character string.
init(Unicode.Scalar
) Creates a character containing the given Unicode scalar value.
init(extendedGraphemeClusterLiteral: Character
) Creates a character with the specified value.
static func < (lhs: Character, rhs: Character
) -> Bool static func == (lhs: Character, rhs: Character
) -> Bool
Instance members
var asciiValue: UInt8?
The ASCII encoding value of this character, if it is an ASCII character.
var customMirror: Mirror
A mirror that reflects the
Character
instance.var debugDescription: String
A textual representation of the character, suitable for debugging.
var description: String
var hexDigitValue: Int?
The numeric value this character represents, if it is a hexadecimal digit.
var isASCII: Bool
A Boolean value indicating whether this is an ASCII character.
var isCased: Bool
A Boolean value indicating whether this character changes under any form of case conversion.
var isCurrencySymbol: Bool
A Boolean value indicating whether this character represents a currency symbol.
var isHexDigit: Bool
A Boolean value indicating whether this character represents a hexadecimal digit.
var isLetter: Bool
A Boolean value indicating whether this character is a letter.
var isLowercase: Bool
A Boolean value indicating whether this character is considered lowercase.
var isMathSymbol: Bool
A Boolean value indicating whether this character represents a symbol that naturally appears in mathematical contexts.
var isNewline: Bool
A Boolean value indicating whether this character represents a newline.
var isNumber: Bool
A Boolean value indicating whether this character represents a number.
var isPunctuation: Bool
A Boolean value indicating whether this character represents punctuation.
var isSymbol: Bool
A Boolean value indicating whether this character represents a symbol.
var isUppercase: Bool
A Boolean value indicating whether this character is considered uppercase.
var isWhitespace: Bool
A Boolean value indicating whether this character represents whitespace, including newlines.
var isWholeNumber: Bool
A Boolean value indicating whether this character represents a whole number.
var unicodeScalars: Character.UnicodeScalarView
var utf16: Character.UTF16View
A UTF-16 encoding of
self
.var utf8: Character.UTF8View
A UTF-8 encoding of
self
.var wholeNumberValue: Int?
The numeric value this character represents, if it represents a whole number.
func hash(into: inout Hasher
) Hashes the essential components of this value by feeding them into the given hasher.
func lowercased(
) -> String Returns a lowercased version of this character.
func uppercased(
) -> String Returns an uppercased version of this character.
func write<Target>(to: inout Target
) Writes the character into the given output stream.
Show obsolete interfaces (1)
Hide obsolete interfaces
var customPlaygroundQuickLook: _PlaygroundQuickLook
A custom playground Quick Look for the
Character
instance.