VBScript Len Function

The Len function returns the number of characters in a string."

Examples

Example 1

<%

txt="This is a beautiful day!"
response.write(Len(txt))

%>

The output of the code above will be:

24

Example 2

You can also put the string directly into the Len function:

<%

response.write(Len("This is a beautiful day!"))

%>

The output of the code above will be:

24

❮ Complete VBScript Reference