@yookue/ts-lang-utils
    Preparing search index...

    Function startsWithAnyIgnoreCase

    • Returns whether the given string starts with any of the prefixes, case-insensitive

      Parameters

      • Optionaltext: null | string

        the source string to check

      • Optionalprefixes: (undefined | null | string)[]

        the target strings to compare

      Returns boolean

      whether the given string starts with any of the prefixes, case-insensitive

      David Hsing

      startsWithAnyIgnoreCase('foobar', ['FOO', 'BAR']);    // true
      startsWithAnyIgnoreCase('hello', ['FOO', 'BAR']); // false