Tweakr
    Preparing search index...

    Function startsWithIgnoreCase

    • Checks if a string starts with the given search string, ignoring case.

      Parameters

      • str: string

        The string to check.

      • search: string

        The search string to match at the start of the string.

      Returns boolean

      true if the string starts with the search string (case-insensitive), otherwise false.

      1.1.0

      startsWithIgnoreCase("Hello World", "hello"); // true
      startsWithIgnoreCase("TypeScript", "TS"); // true
      startsWithIgnoreCase("JavaScript", "script"); // false