Options
All
  • Public
  • Public/Protected
  • All
Menu

Module trimEnd

Index

References

Functions String

References

Renames and re-exports __type

String Functions

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

    since

    5.6.0

    see

    trim,trimStart

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

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

    Parameters

    • str: string

      The string to trim.

    • chars: string

      The characters to trim.

    • Optional guard: any

    Returns string

    Returns the trimmed string.