StructureFoundationInternationalization
FloatingPointFormatStyle.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 floating-point percentage values and their textual representations.
struct Percent
Topics
Initializers
init(from: any Decoder) throwsinit(locale: Locale)Creates a floating-point percent format style that uses the given locale.
Instance Properties
var attributed: FloatingPointFormatStyle<Value>.AttributedAn attributed format style based on the floating-point percent format style.var locale: LocaleThe locale of the format style.
Instance Methods
func decimalSeparator(strategy: FloatingPointFormatStyle<Value>.Percent.Configuration.DecimalSeparatorDisplayStrategy) -> FloatingPointFormatStyle<Value>.PercentModifies the format style to use the specified decimal separator display strategy.func grouping(FloatingPointFormatStyle<Value>.Percent.Configuration.Grouping) -> FloatingPointFormatStyle<Value>.PercentModifies the format style to use the specified grouping.func notation(FloatingPointFormatStyle<Value>.Percent.Configuration.Notation) -> FloatingPointFormatStyle<Value>.PercentModifies the format style to use the specified notation.func precision(FloatingPointFormatStyle<Value>.Percent.Configuration.Precision) -> FloatingPointFormatStyle<Value>.PercentModifies the format style to use the specified precision.func rounded(rule: FloatingPointFormatStyle<Value>.Percent.Configuration.RoundingRule, increment: Double?) -> FloatingPointFormatStyle<Value>.PercentModifies the format style to use the specified rounding rule and increment.func scale(Double) -> FloatingPointFormatStyle<Value>.PercentModifies the format style to use the specified scale.func sign(strategy: FloatingPointFormatStyle<Value>.Percent.Configuration.SignDisplayStrategy) -> FloatingPointFormatStyle<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