FEEL

string length

FEEL built-in function · FEEL string functions

string length(string)

Returns the number of characters in the string.

The length counts characters (Unicode code points), so accented letters and emoji count as one each. Spaces count too. A non-string argument such as a number gives null; convert it with string() first if you want the length of its text.

Parameters

ParameterTypeDescription
stringstringthe string to measure

Examples

string length("foo")
string length("")

Edge cases and null handling

string length("äöü")

Each accented letter counts as one character.

string length("ab😀")

An emoji is one code point, so it counts as one character.

string length(" ")

Whitespace counts.

string length(123)

Numbers are not converted. B-FEEL returns 0.

string length(string(123))
string length(null)

Related functions

substring

Defined by the OMG DMN 1.6 specification, chapter 10.3.4 (built-in functions).