StructureFoundationEssentials
Locale.Subdivision
iOS 16.0+
iPadOS 16.0+
Mac Catalyst 16.0+
macOS 13.0+
tvOS 16.0+
watchOS 9.0+
A type that represents a subdivision of a region, such as a state in the US or a province in Canada.
struct Subdivision
Topics
Operators
Initializers
init(String)Creates a subdivision with the given identifier.init(from: any Decoder) throwsinit(stringLiteral: String)Creates a subdivision from a Unicode identifier as a string literal.
Instance Properties
var debugDescription: Stringvar identifier: StringThe subdivision’s identifier.
Instance Methods
Type Methods
static func subdivision(for: Locale.Region) -> Locale.SubdivisionReturns the subdivision representing the given region as a whole.
Relationships
Conforms To
Swift.CopyableSwift.CustomDebugStringConvertibleSwift.DecodableSwift.EncodableSwift.EquatableSwift.EscapableSwift.ExpressibleByExtendedGraphemeClusterLiteralSwift.ExpressibleByStringLiteralSwift.ExpressibleByUnicodeScalarLiteralSwift.HashableSwift.SendableSwift.SendableMetatype