7.5

Table Of Contents
Left (function)
Extracts the specified leftmost characters of a string.
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
This example creates an a string array with the same number of elements as the &parts array.
©2010 Objectif Lune Inc - 495 -