Skip to main content

endswith Function

endswith takes two values: a string to check and a suffix string. The function returns true if the first string ends with that exact suffix.

Code Block
endswith(string, suffix)

Examples

Code Block
> endswith("hello world", "world")
true

> endswith("hello world", "hello")
false
  • startswith takes two values: a string to check and a prefix string. The function returns true if the string begins with that exact prefix.