Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

VBScript Len function


May 13, 2021 VBScript


Table of contents


VBScript Len function

The VBScript Len function can return the number of characters in a string, or the number of bytes required to store variables.


VBScript Len function Complete VBScript reference manual

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

Grammar

Len(string)

parameter describe
string String expressions.

Instance 1

<script type="text/vbscript">

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

</script>

The above example output results:

24

Try it out . . .

Instance 2

You can also put strings directly into the Len function:

<script type="text/vbscript">

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

</script>

The above example output results:

24

Try it out . . .

VBScript Len function Complete VBScript reference manual