Function trimStart

  • Removes leading whitespace or specified characters from string.

    Parameters

    • Optionalstring: string

      The string to trim.

    • Optionalchars: string

      The characters to trim.

    Returns string

    Returns the trimmed string.

    4.0.0

    trim, trimEnd

    trimStart('  abc  ')
    // => 'abc '

    trimStart('-_-abc-_-', '_-')
    // => 'abc-_-'