V4.1
Parameters, Value
Ends With function judges whether string1
ends with string2
, returns 1 if true and 0 if false.
Syntax:
- Format: ends_with(
<text>
,<tail>
) - Parameters: see table below
- Value: ATTR (number)
Name | Category | Specification | Description |
---|---|---|---|
text | ATTR(string) | / | The string to be judged |
tail | ATTR(string) | / | The string that ends the text |
Constant
Example: judge if 'daS351sXFE51scf' ends with 'E51scf'
return ends_with("daS351sXFE51scf", "E51scf")
Function
Example: judge if 'daS351sXFE51scf' in lowercase is ended with 'e51scf'
return ends_with(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, ends_with(n.address, "@gmail.com")
Property
Example: find 10 email addresses that end with '@gmail.com'
find().nodes({ends_with(@email.address, "@gmail.com")}) as n
limit 10
return n.address