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

    Function startsWith

    • Returns whether the given string starts with the prefix

      Parameters

      • Optionaltext: null | string

        the source string to check

      • Optionalprefix: null | string

        the target string to compare

      Returns boolean

      whether the given string starts with the prefix

      David Hsing

      startsWith('foobar', 'foo');    // true
      startsWith('hello', 'bar'); // false