Function trimStart

Removes given characters from the start of the string. See also: trim and trimEnd.

trimStart("abbcb", "ab"); // "bcb"
trimStart("!!aaa!", "!"); // "aaa!"
  • Parameters

    • source: string

      Source string.

    • characters: string

      Characters to remove, taken as a whole.

    Returns string