Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • String

Index

Methods

match

  • match(matcher: object): RegExpMatchArray | null
  • Matches a string an object that supports being matched against, and returns an array containing the results of that search.

    Parameters

    • matcher: object

      An object that supports being matched against.

      • __@match: function
        • __@match(string: string): RegExpMatchArray | null
        • Parameters

          • string: string

          Returns RegExpMatchArray | null

    Returns RegExpMatchArray | null

replace

  • replace(searchValue: object, replaceValue: string): string
  • replace(searchValue: object, replacer: function): string
  • Replaces text in a string, using an object that supports replacement within a string.

    Parameters

    • searchValue: object

      A object can search for and replace matches within a string.

      • __@replace: function
        • __@replace(string: string, replaceValue: string): string
        • Parameters

          • string: string
          • replaceValue: string

          Returns string

    • replaceValue: string

      A string containing the text to replace for every successful match of searchValue in this string.

    Returns string

  • Replaces text in a string, using an object that supports replacement within a string.

    Parameters

    • searchValue: object

      A object can search for and replace matches within a string.

      • __@replace: function
        • __@replace(string: string, replacer: function): string
        • Parameters

          • string: string
          • replacer: function
              • (substring: string, ...args: any[]): string
              • Parameters

                • substring: string
                • Rest ...args: any[]

                Returns string

          Returns string

    • replacer: function

      A function that returns the replacement text.

        • (substring: string, ...args: any[]): string
        • Parameters

          • substring: string
          • Rest ...args: any[]

          Returns string

    Returns string

search

  • search(searcher: object): number
  • Finds the first substring match in a regular expression search.

    Parameters

    • searcher: object

      An object which supports searching within a string.

      • __@search: function
        • __@search(string: string): number
        • Parameters

          • string: string

          Returns number

    Returns number

split

  • split(splitter: object, limit?: undefined | number): string[]
  • Split a string into substrings using the specified separator and return them as an array.

    Parameters

    • splitter: object

      An object that can split a string.

      • __@split: function
        • __@split(string: string, limit?: undefined | number): string[]
        • Parameters

          • string: string
          • Optional limit: undefined | number

          Returns string[]

    • Optional limit: undefined | number

      A value used to limit the number of elements returned in the array.

    Returns string[]

Generated using TypeDoc