PersonNameComponents
struct PersonNameComponents
struct PersonNameComponents
import Foundation
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol CustomReflectable
A type that explicitly supplies its own mirror.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Decodable
A type that can decode itself from an external representation.
protocol Encodable
A type that can encode itself to an external representation.
protocol Equatable
A type that can be compared for value equality.
protocol Escapable
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol ReferenceConvertible : CustomDebugStringConvertible, CustomStringConvertible, Hashable
Decorates types which are backed by a Foundation reference type.
protocol Sendable
init()
init(from decoder: any Decoder) throws
init(namePrefix: String? = nil, givenName: String? = nil, middleName: String? = nil, familyName: String? = nil, nameSuffix: String? = nil, nickname: String? = nil, phoneticRepresentation: PersonNameComponents? = nil)
var customMirror: Mirror { get }
var debugDescription: String { get }
var description: String { get }
var familyName: String?
Assuming the full name is: Dr. Johnathan Maple Appleseed Esq., nickname “Johnny”, name passed from one generation to another to indicate lineage, e.g. Appleseed
var givenName: String?
Assuming the full name is: Dr. Johnathan Maple Appleseed Esq., nickname “Johnny”, name bestowed upon an individual by one’s parents, e.g. Johnathan
var middleName: String?
Assuming the full name is: Dr. Johnathan Maple Appleseed Esq., nickname “Johnny”, secondary given name chosen to differentiate those with the same first name, e.g. Maple
var namePrefix: String?
Assuming the full name is: Dr. Johnathan Maple Appleseed Esq., nickname “Johnny”, pre-nominal letters denoting title, salutation, or honorific, e.g. Dr., Mr.
var nameSuffix: String?
Assuming the full name is: Dr. Johnathan Maple Appleseed Esq., nickname “Johnny”, post-nominal letters denoting degree, accreditation, or other honor, e.g. Esq., Jr., Ph.D.
var nickname: String?
Assuming the full name is: Dr. Johnathan Maple Appleseed Esq., nickname “Johnny”, name substituted for the purposes of familiarity, e.g. “Johnny”
var phoneticRepresentation: PersonNameComponents? { get set }
Each element of the phoneticRepresentation should correspond to an element of the original PersonNameComponents instance. The phoneticRepresentation of the phoneticRepresentation object itself will be ignored. nil by default, must be instantiated.
func encode(to encoder: any Encoder) throws
typealias ReferenceType = NSPersonNameComponents
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.