String.len

String.len

String.len

Function

Returns the string length. ASCII strings are measured in bytes; non-ASCII strings are measured in Unicode characters.

Syntax

Parameters

No parameters.

Return value

TypeDescription
IntReturns the string length.

Example

Notes

  • The original string is not modified.
  • The length of the ASCII string is equal to the number of bytes; when it contains non-ASCII characters such as Chinese, it is returned by the number of characters.