THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

VBScript Len Function


VBScript Reference Complete VBScript Reference

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

Syntax

Len(string)

Parameter Description
string A string expression

Examples

Example 1

<%

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

%>

The output of the code above will be:

24
Show Example »

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
Show Example »

VBScript Reference Complete VBScript Reference