debugDescription
A textual representation of the character, suitable for debugging.
var debugDescription: String { get }
A textual representation of the character, suitable for debugging.
var debugDescription: String { get }
import Swift
@frozen struct Character
A single extended grapheme cluster that approximates a user-perceived character.
@frozen struct String
A Unicode string value that is a collection of characters.
init(_ s: String)
Creates a character from a single-character string.
init(_ content: Unicode.Scalar)
Creates a character containing the given Unicode scalar value.
init(extendedGraphemeClusterLiteral value: Character)
Creates a character with the specified value.
var asciiValue: UInt8? { get }
The ASCII encoding value of this character, if it is an ASCII character.
var customMirror: Mirror { get }
A mirror that reflects the Character
instance.
var description: String { get }
var hexDigitValue: Int? { get }
The numeric value this character represents, if it is a hexadecimal digit.
var isASCII: Bool { get }
A Boolean value indicating whether this is an ASCII character.
var isCased: Bool { get }
A Boolean value indicating whether this character changes under any form of case conversion.
var isCurrencySymbol: Bool { get }
A Boolean value indicating whether this character represents a currency symbol.
var isHexDigit: Bool { get }
A Boolean value indicating whether this character represents a hexadecimal digit.
var isLetter: Bool { get }
A Boolean value indicating whether this character is a letter.
var isLowercase: Bool { get }
A Boolean value indicating whether this character is considered lowercase.
var isMathSymbol: Bool { get }
A Boolean value indicating whether this character represents a symbol that naturally appears in mathematical contexts.
var isNewline: Bool { get }
A Boolean value indicating whether this character represents a newline.
var isNumber: Bool { get }
A Boolean value indicating whether this character represents a number.
var isPunctuation: Bool { get }
A Boolean value indicating whether this character represents punctuation.
var isSymbol: Bool { get }
A Boolean value indicating whether this character represents a symbol.
var isUppercase: Bool { get }
A Boolean value indicating whether this character is considered uppercase.
var isWhitespace: Bool { get }
A Boolean value indicating whether this character represents whitespace, including newlines.
var isWholeNumber: Bool { get }
A Boolean value indicating whether this character represents a whole number.
var unicodeScalars: Character.UnicodeScalarView { get }
var utf16: Character.UTF16View { get }
A UTF-16 encoding of self
.
var utf8: Character.UTF8View { get }
A UTF-8 encoding of self
.
var wholeNumberValue: Int? { get }
The numeric value this character represents, if it represents a whole number.
static func < (lhs: Character, rhs: Character) -> Bool
static func == (lhs: Character, rhs: Character) -> Bool
func hash(into hasher: 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 target: inout Target) where Target : TextOutputStream
Writes the character into the given output stream.
typealias UTF16View = String.UTF16View
A view of a character’s contents as a collection of UTF-16 code units. See String.UTF16View for more information
typealias UTF8View = String.UTF8View
A view of a character’s contents as a collection of UTF-8 code units. See String.UTF8View for more information
typealias UnicodeScalarView = String.UnicodeScalarView
var customPlaygroundQuickLook: _PlaygroundQuickLook { get }
A custom playground Quick Look for the Character
instance.