Function endsWith()
judges whether a string ends with a specified substring, and returns 1 for true, 0 for false.
Arguments:
- String <string>
- Substring <string>
Returns:
- Result <number>
If the string and the sub string are non-homologous, Cartesian Product will be applied when the function is called in a WITH clause, or column length will be trimmed when called in a RETURN clause.
Constant
Example: Judge if 'daS351sXFE51scf' ends with 'E51scf'
return endsWith("daS351sXFE51scf", "E51scf")
Function
Example: Judge if 'daS351sXFE51scf' in lowercase is ended with 'e51scf'
return endsWith(lower("daS351sXFE51scf"), "e51scf")
Alias
Example: Find 10 email adresses, judge if they are ended with '@gmail.com'
find().nodes({@email}) as n
limit 10
return n.address, endsWith(n.address, "@gmail.com")
Property
Example: Find 10 email addresses that end with '@gmail.com'
find().nodes({endsWith(@email.address, "@gmail.com")}) as n
limit 10
return n.address