textLen function

The textLen function returns the length of the string contained in each row of the column.


Parameters

textLen(column,mode,leaveother)

If you are using continuous attributes, check the Flow Execution Parameters.

Parameter

Description

column

The attribute used to count the string length. The column parameter is mandatory.

If it is not nominal, it will be casted to nominal upon function’s computation.


Example

The following example uses the Adult dataset.

Description

Screenshot

In this example, we want to count the length of the strings contained in each row of an attribute.

To achieve this goal we’re going to use the following formula:

textLen($"fnlwgt")

Here we can see that the formula has counted the number of characters each row contains.