Options
All
  • Public
  • Public/Protected
  • All
Menu

Module string/rtrim

Index

Functions

Functions

  • rtrim(haystack: string, needle?: string): string
  • Removes all occurrences of needle from the end of haystack.

    example
     rtrim('Helloabcabc', 'abc'); //=> 'Hello'
    rtrim(' Hello '); //=> ' Hello'

    Parameters

    • haystack: string

      string to trim

    • needle: string = ' '

      the thing to trim

    Returns string

Generated using TypeDoc