platform-bible-utils
    Preparing search index...

    Function startsWith

    • This function mirrors the startsWith function from the JavaScript Standard String object. It operates on grapheme clusters instead of UTF-16 code units.

      Determines whether the string begins with the characters of a specified string.

      Parameters

      • string: string

        String to search through

      • searchString: string

        The characters to search for at the start of the string

      • Optionalposition: number

        The position at which searchString is expected to begin. Negative values clamp to 0. Default is 0

      Returns boolean

      True if the given characters are found at the beginning of the string, including when searchString is an empty string; otherwise, false