int len(s)
s - string.
Returns number of characters in string. To calculate it, searches for terminating null character. Returns 0 if s is null. Returns 0 if s is VARIANT of type other than VT_BSTR.
For str and lpstr, this function always returns number of bytes. In Unicode mode, some characters consist of 2-4 bytes. For other types, always returns number of 2-byte characters.
For str and BSTR variables, use len property instead of this function. Example: length = s.len.
See also: empty.
lpstr s = "String" int i = len(s) now i is 6 str s = "one two"; s[3]=0 out s.len out len(s) Output: 7 3