StringTools

Helper to manipulate strings

Hierarchy

  • StringTools

Index

Methods

Static EndsWith

Find examples in Playground
  • EndsWith(str: string, suffix: string): boolean
  • Checks for a matching suffix at the end of a string (for ES5 and lower)

    Parameters

    • str: string

      Source string

    • suffix: string

      Suffix to search for in the source string

    Returns boolean

    Boolean indicating whether the suffix was found (true) or not (false)

Static StartsWith

Find examples in Playground
  • StartsWith(str: string, suffix: string): boolean
  • Checks for a matching suffix at the beginning of a string (for ES5 and lower)

    Parameters

    • str: string

      Source string

    • suffix: string

      Suffix to search for in the source string

    Returns boolean

    Boolean indicating whether the suffix was found (true) or not (false)

Generated using TypeDoc