Tweakr
    Preparing search index...

    Function endsWith

    • Checks if a string ends with the given suffix.

      Parameters

      • str: string

        The string to check.

      • suffix: string

        The suffix to test.

      Returns boolean

      true if str ends with suffix, otherwise false.

      1.1.0

      endsWith("Hello World", "World"); // true
      endsWith("Hello World", "world"); // false
      endsWith("Hello", ""); // true