Skip to main content Skip to complementary content


Returns true if the first argument ends with the suffix specified in the second argument.

Any data type can be used. Types other than string are converted to string before the function is applied. If the first argument is in bytes, the second one should be in bytes or a hex string with the prefix 0x or 0X.


  1. Input string.
  2. Suffix.


Expression Result
endsWith("Hello World!", "!") true

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!