Formats a raw string using a template and optional parameters.

  • Parameters

    • raw: string

      The raw string to be formatted.

    • template: string

      The template string used for formatting.

    • Optionalparams: IParams

      Optional parameters for customization.

      • symbol

        The symbol used in the template to indicate characters to be replaced.

      • allowed

        A function or regular expression used to filter characters in the raw string.

      • replace

        A function used to replace characters in the raw string.

    Returns string

    The formatted string.