Options
All
  • Public
  • Public/Protected
  • All
Menu

Module string

Functions

random

  • Generates non-cryptographically strong random string. Generation can be controlled via regular expressions.

    Parameters

    Returns string

    Generated string.

replaceAt

  • replaceAt(replacement: string, index: number, string: string): string
  • Replaces the string at a given position with another one.

    Parameters

    • replacement: string

      The replacement.

    • index: number

      Starting index from where replacement needs to be done.

    • string: string

      Initial string.

    Returns string

    String with replaced characters.

trimChar

  • trimChar(str: string, char: string): string
  • Removes specified char from beginning and ending of the string.

    Parameters

    • str: string

      Input string.

    • char: string

      Trimmed char.

    Returns string

    Trimmed string.