StructureFoundationInternationalization
IntegerFormatStyle.Percent
iOS 15.0+
iPadOS 15.0+
Mac Catalyst 15.0+
macOS 12.0+
tvOS 15.0+
watchOS 8.0+
A format style that converts between integer percentage values and their textual representations.
struct Percent
Topics
Initializers
init(from: any Decoder) throwsinit(locale: Locale)Creates an integer percent format style that uses the given locale.
Instance Properties
var attributed: IntegerFormatStyle<Value>.AttributedAn attributed format style based on the integer percent format style.var locale: LocaleThe locale of the format style.
Instance Methods
func decimalSeparator(strategy: IntegerFormatStyle<Value>.Percent.Configuration.DecimalSeparatorDisplayStrategy) -> IntegerFormatStyle<Value>.PercentModifies the format style to use the specified decimal separator display strategy.func grouping(IntegerFormatStyle<Value>.Percent.Configuration.Grouping) -> IntegerFormatStyle<Value>.PercentModifies the format style to use the specified grouping.func notation(IntegerFormatStyle<Value>.Percent.Configuration.Notation) -> IntegerFormatStyle<Value>.PercentModifies the format style to use the specified notation.func precision(IntegerFormatStyle<Value>.Percent.Configuration.Precision) -> IntegerFormatStyle<Value>.PercentModifies the format style to use the specified precision.func rounded(rule: IntegerFormatStyle<Value>.Percent.Configuration.RoundingRule, increment: Int?) -> IntegerFormatStyle<Value>.PercentModifies the format style to use the specified rounding rule and increment.func scale(Double) -> IntegerFormatStyle<Value>.PercentModifies the format style to use the specified scale.func sign(strategy: IntegerFormatStyle<Value>.Percent.Configuration.SignDisplayStrategy) -> IntegerFormatStyle<Value>.PercentModifies the format style to use the specified sign display strategy for displaying or omitting sign symbols.
Type Aliases
Default Implementations
Relationships
Conforms To
FormatStyleParseableFormatStyleSwift.CopyableSwift.DecodableSwift.EncodableSwift.EquatableSwift.EscapableSwift.HashableSwift.SendableSwift.SendableMetatype_StringProcessing.CustomConsumingRegexComponent_StringProcessing.RegexComponent