platform-bible-utils
    Preparing search index...

    Function indexOf

    • This function mirrors the indexOf function from the JavaScript Standard String object. It handles Unicode code points instead of UTF-16 character codes.

      Returns the index of the first occurrence of a given string.

      Parameters

      • string: string

        String to search through

      • searchString: string

        The string to search for

      • position: undefined | number = 0

        Start of searching. Default is 0

      Returns number

      Index of the first occurrence of a given string