Function findIndices

  • Find the indices of characters in a source text.


    • source: string

      The source text which should be searched.

    • query: string

      The characters to locate in the source text.

    • start: number = 0

      The index to start the search.

    Returns number[] | null

    The matched indices, or null if there is no match.


    Linear on sourceText.


    In order for there to be a match, all of the characters in query must appear in source in the order given by query.

    Characters are matched using strict === equality.

Generated using TypeDoc