Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Format

The CLR Format main module and namespace.

The StringConstructor.format method exposes the core API of the project. Optional configuration methods are stored in the Format.Config sub-module.

Index

Variables

Private CultureInfo

CultureInfo: CultureInfo

Private formatItemRegExp

formatItemRegExp: RegExp

Private padding

padding: Padding

Private paddingDirection

paddingDirection: Direction

Functions

Private applyAlignment

Private applyFormatting

Private getBracesCount

  • getBracesCount(formatItem: string, braceChar: string): number
  • Parameters

    • formatItem: string
    • braceChar: string

    Returns number

innerComponentFormat

  • innerComponentFormat(formatStringComponent: string, value: Object, provider?: FormatProvider): string
  • Converts the object's value to string based on the format specified and returns it.

    Parameters

    Returns string

    The string representation of the object's value, formatted as specified by the format string component and provider.

innerFormat

  • innerFormat(provider: FormatProvider, format: string, args: Object[]): string
  • Converts the value of objects to strings based on the formats specified and inserts them into another string.

    This project-internal (but externally visible) version does not support arbitrary argument overloads.

    Parameters

    Returns string

    A copy of the format string in which the format items have been replaced by the string representation of the corresponding objects in args.

Private isFullyEscaped

  • isFullyEscaped(formatItem: string): boolean

Private padBraces

  • padBraces(formattedString: string, escapedBracesCount: number, paddingChar: string): string
  • Parameters

    • formattedString: string
    • escapedBracesCount: number
    • paddingChar: string

    Returns string

Private replaceFormatItem

setCulture

  • setCulture(locale: string): void

setCurrency

  • setCurrency(currencyCode: string): void

Generated using TypeDoc