VBScript Len Function
Definition and Usage
The Len function can return the number of characters in a string.
Syntax
Len(string|varname)
Parameter | Description |
---|---|
string | String Expression. |
varname | Variable Name. |
Instance
Example 1
dim txt txt="This is a beautiful day!" document.write(Len(txt))
Output:
24
Example 2
document.write(Len("This is a beautiful day!"))
Output:
24