»

LJ::text_length

LJ::text_length — returns both byte length and character length of a string. In a non-Unicode environment, this means byte length twice. In a Unicode environment, the function assumes that its argument is a valid UTF-8 string.

Use

LJ::text_length(text);

Arguments

  • text. the string to measure

Source:

cgi-bin/ljlib.pl

Returns:

a list of two values, (byte_length, char_length).