The endsWith() function checks whether a string ends with a specified substring and returns 1 if true, and 0 if false.
endsWith(str, end_str)
| Argument | Type | Description |
|---|---|---|
str | String | The string to be checked |
end_str | String | The expected ending substring |
Return type: Boolean
UQLreturn endsWith("ultipa.com", "com")
Result: 1
Find webpages with URLs that conclude with ".com".
UQLfind().nodes({endsWith(@webpage.url, ".com")}) as n return n{*}