Len Function
Syntax
Len(S$)
-or-
Len(usertypevar)
Group
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.
Parameters |
Description |
Return the number of chars in this string value. If this value is Null then Null is returned. |
|
Return the number of bytes required to store this user type structure variable. If the user type has any dynamic String or Variant elements the length returned may not be as big 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