# Class StringFormatter

A helper class for formatting strings.

#### Implements

- FormatSettings

#####
Index

### Constructors

constructor

### Accessors

currency
dateFormat
fractionalDigits
numberFormat
timeFormat
timeZone

### Methods

format

##
Constructors

### constructor

- new StringFormatter(): StringFormatter

- #### Returns StringFormatter

##
Accessors

### currency

- get currency(): string

- The default unit of currency to use when formatting currency. See utilities/format/number!NumberSettings.currency.

  #### Returns string

  Implementation of FormatSettings.currency

- set currency(currency): void

- The default unit of currency to use when formatting currency. See utilities/format/number!NumberSettings.currency.

  #### Parameters

  - currency: string

  #### Returns void

  Implementation of FormatSettings.currency

### dateFormat

- get dateFormat(): string

- The default format to use when formatting dates. See utilities/format/date!DateFormatter.format.

  #### Returns string

  Implementation of FormatSettings.dateFormat

- set dateFormat(dateFormat): void

- The default format to use when formatting dates. See utilities/format/date!DateFormatter.format.

  #### Parameters

  - dateFormat: string

  #### Returns void

  Implementation of FormatSettings.dateFormat

### fractionalDigits

- get fractionalDigits(): number

- The default number of digits to show after the decimal point when formatting numbers. See utilities/format/number!NumberSettings.fractionalDigits.

  #### Returns number

  Implementation of FormatSettings.fractionalDigits

- set fractionalDigits(fractionalDigits): void

- The default number of digits to show after the decimal point when formatting numbers. See utilities/format/number!NumberSettings.fractionalDigits.

  #### Parameters

  - fractionalDigits: number

  #### Returns void

  Implementation of FormatSettings.fractionalDigits

### numberFormat

- get numberFormat(): string

- The default format to use when formatting numbers. See utilities/format/number!NumberFormatter.format.

  #### Returns string

  Implementation of FormatSettings.numberFormat

- set numberFormat(numberFormat): void

- The default format to use when formatting numbers. See utilities/format/number!NumberFormatter.format.

  #### Parameters

  - numberFormat: string

  #### Returns void

  Implementation of FormatSettings.numberFormat

### timeFormat

- get timeFormat(): string

- The default format to use when formatting times. See utilities/format/time!TimeFormatter.format.

  #### Returns string

  Implementation of FormatSettings.timeFormat

- set timeFormat(timeFormat): void

- The default format to use when formatting times. See utilities/format/time!TimeFormatter.format.

  #### Parameters

  - timeFormat: string

  #### Returns void

  Implementation of FormatSettings.timeFormat

### timeZone

- get timeZone(): string

- The time zone of a date being formatted. See utilities/format/date!DateFormatter.timeZone.

  #### Returns string

  Implementation of FormatSettings.timeZone

- set timeZone(value): void

- The time zone of a date being formatted. See utilities/format/date!DateFormatter.timeZone.

  #### Parameters

  - value: string

  #### Returns void

  Implementation of FormatSettings.timeZone

##
Methods

### format

- format(formatOrOptions, ...args): string

- Converts the value of objects to strings based on the formats specified and inserts them into another string.

  #### Parameters

  - formatOrOptions: string | FormatOptions

    The format string that acts as a template. The format string can contain one or more format items, which have this syntax: `{index[:format]}`. The index is the zero-based index of the argument whose string representation is to be included at this position in the string. The optional format is a format string that controls how the argument is converted into a string, if the argument is a Date object or number. To include a literal `{` or `}` character in the output, escape the character by repeating it twice in the format string. This argument can also be a format options object instead.

  - `Rest`...args: unknown[]

    The values to substitute into the format string. Null and undefined values will be converted into empty strings.

  #### Returns string