SpreadJS Documentation
LENB
SpreadJS Documentation > Formula Reference > Formula Functions > LENB

This function returns the number of bytes used to represent the characters in a text string.

Syntax

LENB(text_value)

Arguments

The argument is the text whose length you want to find. Spaces in the specified text value are counted as characters. The argument must be a string or a cell reference to a string value.

Remarks

The LENB function counts 2 bytes per character, but this happens only when a DBCS language is set as the default language.

Data Types

Accepts string data. Returns numeric data.

Examples

LENB("rheabuto") gives the result 8.

LENB("rosy") gives the result 4.

See Also