6.0

Table Of Contents
110
Language Reference
4
Syntax
left( string, number ) string value
Arguments
string — String value from which to extract characters.
number — Integer value specifying how many characters to extract from the beginning of the string.
Code Sample Example
This example prints a string up to a certain position.
Example
define(&data,string,'This is a~sample string')
%Define string
define(&x,integer, pos('~', &data))
%Find tilde
%Print the string up to the tilde character, if found
if(&x>1)
show(left(&data,&x-1))
endif()
Length (function)
Returns the length of a string, or the number of elements in an array.
Syntax
length( element ) integer value
Argument
element — Either a string value, or an array variable.
Code Sample Example
Example 1 creates an a string array with the same number of elements as the &parts array. Example 2
prints part of a string, starting after a specific delimiter.
Example 1
define( &partnames, arraystring, length( &parts ) )