UCE Docs / str_ends_with

Signature

bool str_ends_with(String haystack, String needle)

Parameters

haystack : string to inspect
needle : suffix to compare against the end of haystack
return value : true when haystack ends with needle, otherwise false

Checks whether haystack ends with needle.

Example

print(str_ends_with("index.uce", ".uce") ? "yes\n" : "no\n");
Output
yes