Instance Methodswift 6.0.3FoundationInternationalization->FoundationEssentials
locale(_:)
- iOS
- 15.0+
- macOS
- 12.0+
- tvOS
- 15.0+
- watchOS
- 8.0+
func locale(_ locale: Locale) -> Decimal.FormatStyle.Percent
func locale(_ locale: Locale) -> Decimal.FormatStyle.Percent
s20FoundationEssentials7DecimalV0A20InternationalizationE11FormatStyleV7PercentV6localeyAhA6LocaleVF
What are these?8HKA
import FoundationEssentials
import FoundationInternationalization
struct Percent
struct Decimal
struct FormatStyle
struct Locale
Locale
encapsulates information about linguistic, cultural, and technological conventions and standards. Examples of information encapsulated by a locale include the symbol used for the decimal separator in numbers and the way dates are formatted.
init(from decoder: any Decoder) throws
init(locale: Locale = .autoupdatingCurrent)
var attributed: Decimal.FormatStyle.Attributed { get }
var locale: Locale
var parseStrategy: Decimal.ParseStrategy<Decimal.FormatStyle.Percent> { get }
func consuming(_ input: String, startingAt index: String.Index, in bounds: Range<String.Index>) throws -> (upperBound: String.Index, output: Decimal)?
func decimalSeparator(strategy: Decimal.FormatStyle.Percent.Configuration.DecimalSeparatorDisplayStrategy) -> Decimal.FormatStyle.Percent
func format(_ value: Decimal) -> String
func grouping(_ group: Decimal.FormatStyle.Percent.Configuration.Grouping) -> Decimal.FormatStyle.Percent
func notation(_ notation: Decimal.FormatStyle.Percent.Configuration.Notation) -> Decimal.FormatStyle.Percent
func precision(_ p: Decimal.FormatStyle.Percent.Configuration.Precision) -> Decimal.FormatStyle.Percent
func rounded(rule: Decimal.FormatStyle.Percent.Configuration.RoundingRule = .toNearestOrEven, increment: Int? = nil) -> Decimal.FormatStyle.Percent
func scale(_ multiplicand: Double) -> Decimal.FormatStyle.Percent
func sign(strategy: Decimal.FormatStyle.Percent.Configuration.SignDisplayStrategy) -> Decimal.FormatStyle.Percent
typealias Configuration = NumberFormatStyleConfiguration
typealias RegexOutput = Decimal