Skip to content

tm_endswith Function

The tm_endswith function checks if a given string ends with a specified suffix. It accepts two arguments: the string to evaluate and the suffix string. The function returns true if the string ends with the exact suffix provided.

hcl
tm_endswith(string, suffix)

Examples

sh
tm_endswith("hello world", "world")
true

tm_endswith("hello world", "hello")
false
  • The tm_startswith function checks if a given string starts with a specified prefix. It accepts two arguments: the string to evaluate and the prefix string. The function returns true if the string begins with the exact prefix provided.