compactName
A locale-appropriate compact name notation.
Declaration
static var compactName: NumberFormatStyleConfiguration.Notation { get }Discussion
A compact name notation, when available in the format style’s locale, that uses prefixes or suffixes corresponding to powers of ten. The following example shows a compact name notation in the fr_FR locale:
let compactNameFormatted = 1234.formatted(.number
.locale(Locale(identifier: "fr_FR"))
.notation(.compactName)) // "1,2 k"