Strings
String concatenation​
String concatenation is made using the +
operator. Examples:
"ab" + "cd" + "ef";
"ab"+12+"de";
"ab"+1+2
The first argument of a cocatenation with +
must be a string:
1+2+"ab"
String matching​
These functions match a string against a pattern:
like(Charstring string, Charstring pattern) -> Boolean
like_i(Charstring string, Charstring pattern) -> Boolean
In a pattern *
matches sequence of characters and ?
matches a
single character. The [chars]
pattern matches any character in
chars
. The function like()
is case sensitive and like_i
is not.
Examples:
like("abc","??c");
like("ac","a*c");
like("ac","a?c");
like("abc","a[bd][dc]");
like("abc","a[bd][de]");
like_i("AbC","a*c")