LEN function

LEN(Text) LEN(Text)

Text

Text or { Text }

The text string whose length should be returned.

Returns

Number or { Number }

The length of the given text string.

Returns the length of a text string. LEN("test")LEN("test") returns 4 and CHARAT("abc", LEN("abc"))CHARAT("abc"; LEN("abc")) returns the last character of "abc", "c".

When applied to an array, LEN returns an array containing the lengths of all array elements. LEN({ "a", "ab", "abc" })LEN({ "a"; "ab"; "abc" }) returns { 1, 2, 3 }{ 1; 2; 3 }.

Examples

LEN("test")LEN("test")

Returns 4.

CHARAT("abc", LEN("abc"))CHARAT("abc"; LEN("abc"))

Returns the last character of "abc", "c".

LEN({ "a", "ab", "abc" })LEN({ "a"; "ab"; "abc" })

Returns { 1, 2, 3 }{ 1; 2; 3 }.

LEFT(TextField1, LEN(TextField1) / 2)LEFT(TextField1; LEN(TextField1) / 2)

Returns the first half of the value of TextField1.