Skip to main content

Strings

String concatenation

String concatenation is made using the infix operator ||.

Examples:

'ab' || 'cd' || 'ef';
'ab' || 12 || 'de';
'ab' || 1 || 2

Concatenation of strings and other objects is implemented by the generic system function concat(Object x,Object y)->Object.

String matching

A string str is matched against a regular expression pattern pat using the infix operator str like pat. In a pattern % (or *) matches a sequence of characters, while _ matches a single character. The [chars] pattern matches any character in chars.

Examples:

'abc' like '__c'
'abc' like '%c'
'abc' like 'a[bd][dc]'
'abc' like 'a[bd][de]'

The like operator is implemented by the system function like(Charstring str, Charstring pat)->Boolean.

Functions

Strings