18.01.2013 Views

VBScript Reference Manual for InduSoft Web Studio

VBScript Reference Manual for InduSoft Web Studio

VBScript Reference Manual for InduSoft Web Studio

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>VBScript</strong> <strong>Reference</strong> <strong>Manual</strong> <strong>InduSoft</strong> <strong>Web</strong> <strong>Studio</strong><br />

LeftB<br />

Description Returns a specified number of bytes from the left side of a string<br />

Usage strVal = Left(string, length)<br />

Arguments string<br />

String expression from which the leftmost bytes are returned.<br />

length<br />

Numeric expression indicating how many bytes to return.<br />

Return A String.<br />

Remarks The LeftB function is used with byte data contained in a string instead of character data. If string<br />

contains Null, Null is returned. If length = 0, a zero-length string("") is returned. If length is greater<br />

than or equal to the number of characters in string, the entire string is returned. To determine the<br />

number of characters in string, use the Len function.<br />

See Also Left, Len, LenB, LTrim, Mid, MidB, Right, RTrim, Trim<br />

Example The following example uses the Left function to return the first three characters of MyString<br />

Len<br />

Description Returns the number of characters in a string.<br />

Usage intVal = Len(string)<br />

Arguments string<br />

Any valid string expression.<br />

Return An Integer<br />

Remarks If string contains Null, Null is returned. The Len function is used with character data contained in<br />

a string.<br />

See Also Left, LeftB, LenB, LTrim, Mid, MidB, Right, RTrim, Trim<br />

Example Dim MyString<br />

MyString = Len("VBSCRIPT") ' MyString contains 8.<br />

LenB<br />

Description Returns the number of bytes used to represent a string.<br />

Usage LenB(string)<br />

Arguments string<br />

Any valid string expression containing byte data.<br />

Return An Integer.<br />

Remarks If string contains Null, Null is returned. The LenB function is used with byte data contained in a<br />

string. Instead of returning the number of characters in a string, LenB returns the number of bytes<br />

used to represent that string.<br />

See Also Left, LeftB, Len, LTrim, Mid, MidB, Right, RTrim, Trim<br />

146 <strong>InduSoft</strong>, Ltd.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!