9.0

193
Example
Sub Main
Debug
.Print Len("Hello") ' 5
End
Sub
Len Function
Syntax
Len(S$)
-or-
Len(usertypevar)
Group
String
Description
Return the number of characters in S$.
Note: A similar function, LenB, returns the number of bytes in the string. For a usertypevar
, LenB returns the
number of bytes of memory occupied by the variable's data.
Parameter Description
S$ Return the number of chars in this string value. If this value is Null then Null is
returned.
usertypevar Return the number of b
y
tes re
q
uired to store this user t
yp
e variable. If the user t
yp
e
has any dynamic String and Variant elements the len
g
th returned ma
y
not be as bi
g
as the actual number of bytes required.
See Also: InStr( ), InStrRev( ), Left$( ), Mid$( ), Replace$( ), Right$( ).
Example
Sub Main
Debug
.Print Len("Hello") ' 5
End
Sub
Let Instruction
Syntax
[Let] var = expr
Group
Assignment
Description