V4.1
Parameters, Value
Starts With function judges whether string1
starts with string2
, returns 1 if true and 0 if false.
Syntax:
- Format: starts_with(
<text>
,<head>
) - Parameters: see table below
- Value: ATTR (numbers)
Name | Category | Specification | Description |
---|---|---|---|
text | ATTR(string) | / | The string to be judged |
head | ATTR(string) | / | The string that starts a text |
Constant
Example: judge if 'daS351sXFE51scf' starts with 'daS351s'
return starts_with("daS351sXFE51scf", "daS351s")
Function
Example: judge if 'daS351sXFE51scf' in lowercase starts with 'das351s'
return starts_with(lower("daS351sXFE51scf"), "daS351s")
Alias
Example: find 10 numbers and judge if those numbers start with 170
find().nodes({@phone}) as n
limit 10
return n.number, starts_with(n.number, "170")
Property
Example: find 10 numbers that start with 170
find().nodes({starts_with(@phone.number, "170")}) as n
limit 10
return n.number