len()

Read(829) Label: compute, string,

Description:

Compute the length of a string.

Syntax:

len(s,cs)

Note:

The function computes the number of bytes in string s. When parameter cs, the character set, is absent, it gets the number of characters in the string and automatically uses GB2312 charset.

Parameter:

s

A string.

cs

Charset; can be omitted.

Return value:

Integer

Example:

len("esproc")

6

len(" esproc ")

8

len("esproc",)

6

len("集算器",)

6,字符集参数为空,使用GB2312字符集

len("esproc","UTF-8")

6