The Len function takes a string value as an input and returns the number of characters in the string as an integer. A simple example can be seen below:
Dim strName strName = "Scott"
Dim iCharCount iCharCount = Len(strName) 'iCharCount = 5
If you are interested in the number of bytes that make up a string (as opposed to the number of characters in a string, use the LenB function. (Unicode characters are composed of two bytes per character instead of one.)
For more information be sure to check out the technical docs! Happy Programming!
FAQ posted by Scott Mitchell at
9/24/2000 3:22:52 PM to the
This FAQ has been viewed 45,354 times.