HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

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

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE