beautypg.com

Visara Master Console Center Scripting Guide User Manual

Page 144

background image

Chapter 5 Script Commands

Scripting Guide

144

LEN

Syntax:

LEN( $StringExpr) ==> %Count

Description:

Returns the number of characters in a string expression.

Action:

Counts the number of characters in an evaluated character expression.

Parameters:

$StringExpr. String expression. The character string to count.

Returns:

Numeric value. The length of the character string.

Notes:

1. If the string is empty “”, zero is returned.
2. Each byte in the string counts as one.

Example:

$String := “Hello”
%Len := LEN( $String)
// %Len will contain the value 5.
%Len := LEN( $Text)
IF LEN( $Name) == 0
//some

commands

ENDIF
%Count := LEN( “****” + $Msg[ 1] + $Msg[ 2] + “****”)

See Also:

ALEN