Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

VBScript Len Function

Returns the number of characters in a string or the number of bytes required to store a variable.

Syntax: VBScript Len Function

Len(string | varname)

Arguments: VBScript Len Function

string

Any valid string expression. If string contains Null, Null is returned.

varname

Any valid variable name. If varname contains Null, Null is returned.

Remarks: VBScript Len Function

The following example uses the Len function to return the number of characters in a string:

Dim MyString

MyString = Len("VBSCRIPT") ' MyString contains 8.

Note

The LenB function is used with byte data contained in a string. Instead of returning the number of characters in a string, LenB returns the number of bytes used to represent that string.

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.