Formatter

public protocol Formatter

Formats a value for display purposes.

  • Formats the given value.

    Declaration

    Swift

    func formattedValue(for value: String) -> String

    Parameters

    value

    The value to format.

    Return Value

    A formatted version of the given value.

  • Sanitizes (unformats) the given value.

    Declaration

    Swift

    func sanitizedValue(for value: String) -> String

    Parameters

    value

    The formatted value to remove the formatting from.

    Return Value

    The given value but without any formatting.