Options
All
  • Public
  • Public/Protected
  • All
Menu

Module trimStart

Index

References

Functions String

References

Renames and re-exports __type

String Functions

  • trimStart(str: string, chars: string, guard?: any): string
  • Removes leading whitespace or specified characters from string.

    since

    5.6.0

    see

    trim,trimEnd

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

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

    Parameters

    • str: string

      The string to trim.

    • chars: string

      The characters to trim.

    • Optional guard: any

    Returns string

    Returns the trimmed string.