Overview
The startsWith()
function checks whether a string starts with a specified substring and returns 1
if true, and 0
if false.
Syntax
startsWith(str, start_str)
Argument | Type | Description |
---|---|---|
str |
String | The string to be checked |
start_str |
String | The expected starting substring |
Return type: Boolean
Example of Result
return startsWith("ultipa.com", "Ultipa")
Result: 0
Example of Use
Find webpages with URLs that begin with "https://".
find().nodes({startsWith(@webpage.url, "https://")}) as n
return n{*}