Skip to content

EndsWith

ricardoboss edited this page Sep 13, 2023 · 1 revision

Description

The endsWith function returns true if the string ends with the specified value.

Syntax

endsWith(string subject, string suffix)
  • subject is the string to check.
  • suffix is the value to check for.

Remarks

  • The comparison is case-sensitive.

Examples

endsWith("Hello World", "World") // True
endsWith("Hello World", "Hello") // False