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

    Function endsWith

    • Returns whether the given string ends with the suffix

      Parameters

      • Optionaltext: null | string

        the source string to check

      • Optionalsuffix: null | string

        the target string to compare

      Returns boolean

      whether the given string ends with the suffix

      David Hsing

      endsWith('foobar', 'bar');    // true
      endsWith('hello', 'bar'); // false