<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/FloatingPointFormatStyle/Percent",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation24FloatingPointFormatStyleV7PercentV"
  },
  "title" : "FloatingPointFormatStyle.Percent"
}
-->

# FloatingPointFormatStyle.Percent

A format style that converts between floating-point percentage values and their textual representations.

```
struct Percent
```

## Topics

### Creating a floating-point percent format style

[`init(locale: Locale)`](/documentation/Foundation/FloatingPointFormatStyle/Percent/init(locale:))

Creates a floating-point percent format style that uses the given locale.

### Customizing style behavior

[`func decimalSeparator(strategy: FloatingPointFormatStyle<Value>.Percent.Configuration.DecimalSeparatorDisplayStrategy) -> FloatingPointFormatStyle<Value>.Percent`](/documentation/Foundation/FloatingPointFormatStyle/Percent/decimalSeparator(strategy:))

Modifies the format style to use the specified decimal separator display strategy.

[`func grouping(FloatingPointFormatStyle<Value>.Percent.Configuration.Grouping) -> FloatingPointFormatStyle<Value>.Percent`](/documentation/Foundation/FloatingPointFormatStyle/Percent/grouping(_:))

Modifies the format style to use the specified grouping.

[`func locale(Locale) -> FloatingPointFormatStyle<Value>.Percent`](/documentation/Foundation/FloatingPointFormatStyle/Percent/locale(_:))

Modifies the format style to use the specified locale.

[`func notation(FloatingPointFormatStyle<Value>.Percent.Configuration.Notation) -> FloatingPointFormatStyle<Value>.Percent`](/documentation/Foundation/FloatingPointFormatStyle/Percent/notation(_:))

Modifies the format style to use the specified notation.

[`func precision(FloatingPointFormatStyle<Value>.Percent.Configuration.Precision) -> FloatingPointFormatStyle<Value>.Percent`](/documentation/Foundation/FloatingPointFormatStyle/Percent/precision(_:))

Modifies the format style to use the specified precision.

[`func rounded(rule: FloatingPointFormatStyle<Value>.Percent.Configuration.RoundingRule, increment: Double?) -> FloatingPointFormatStyle<Value>.Percent`](/documentation/Foundation/FloatingPointFormatStyle/Percent/rounded(rule:increment:))

Modifies the format style to use the specified rounding rule and increment.

[`func scale(Double) -> FloatingPointFormatStyle<Value>.Percent`](/documentation/Foundation/FloatingPointFormatStyle/Percent/scale(_:))

Modifies the format style to use the specified scale.

[`func sign(strategy: FloatingPointFormatStyle<Value>.Percent.Configuration.SignDisplayStrategy) -> FloatingPointFormatStyle<Value>.Percent`](/documentation/Foundation/FloatingPointFormatStyle/Percent/sign(strategy:))

Modifies the format style to use the specified sign display strategy.

[`typealias Configuration`](/documentation/Foundation/FloatingPointFormatStyle/Percent/Configuration)

The type the format style uses for configuration settings.

[`enum NumberFormatStyleConfiguration`](/documentation/Foundation/NumberFormatStyleConfiguration)

Configuration settings for formatting numbers of different types.

### Formatting floating-point percent values

[`func format(Value) -> String`](/documentation/Foundation/FloatingPointFormatStyle/Percent/format(_:))

Formats an floating-point value, using this style.

### Creating attributed strings

[`var attributed: FloatingPointFormatStyle<Value>.Attributed`](/documentation/Foundation/FloatingPointFormatStyle/Percent/attributed)

An attributed format style based on the floating-point percent format style.

[`struct Attributed`](/documentation/Foundation/FloatingPointFormatStyle/Attributed-swift.struct)

A format style that converts integers into attributed strings.

### Accessing style properties

[`var locale: Locale`](/documentation/Foundation/FloatingPointFormatStyle/Percent/locale)

The locale of the format style.

### Applying currency styles

### Applying measurement styles

### Applying list styles

### Parsing floating-point percent values

[`var parseStrategy: FloatingPointParseStrategy<FloatingPointFormatStyle<Value>.Percent>`](/documentation/Foundation/FloatingPointFormatStyle/Percent/parseStrategy)

The parse strategy that this format style uses.

### Locating percent values in regular expressions

[`func consuming(String, startingAt: String.Index, in: Range<String.Index>) throws -> (upperBound: String.Index, output: Value)?`](/documentation/Foundation/FloatingPointFormatStyle/Percent/consuming(_:startingAt:in:))

Process the input string within the specified bounds, beginning at the given index, and return the end position (upper bound) of the match and the produced output.

### Supporting types

### Default Implementations

[CustomConsumingRegexComponent Implementations](/documentation/Foundation/FloatingPointFormatStyle/Percent/CustomConsumingRegexComponent-Implementations)

[FormatStyle Implementations](/documentation/Foundation/FloatingPointFormatStyle/Percent/FormatStyle-Implementations)

[ParseableFormatStyle Implementations](/documentation/Foundation/FloatingPointFormatStyle/Percent/ParseableFormatStyle-Implementations)

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomConsumingRegexComponent`](/documentation/Swift/CustomConsumingRegexComponent)

[`Escapable`](/documentation/Swift/Escapable)

[`FormatStyle`](/documentation/Foundation/FormatStyle)

[`ParseableFormatStyle`](/documentation/Foundation/ParseableFormatStyle)

[`Copyable`](/documentation/Swift/Copyable)

[`Equatable`](/documentation/Swift/Equatable)

[`RegexComponent`](/documentation/Swift/RegexComponent)

[`Decodable`](/documentation/Swift/Decodable)

[`Sendable`](/documentation/Swift/Sendable)

[`Encodable`](/documentation/Swift/Encodable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)