Specifications

Left
696 InfoMaker
Return value
Long. Returns a long whose value is the starting position of the last occurrence
of string2 in string1 within the characters specified in searchlength. If string2
is not found in string1 or if searchlength is 0,
LastPos returns 0. If any
argument’s value is null,
LastPos returns null.
Usage The LastPos function is case sensitive. The entire target string must be found
in the source string.
Examples This statement returns 6, because the position of the last occurrence of RU is
position 6:
LastPos("BABE RUTH", "RU")
This statement returns 3:
LastPos("BABE RUTH", "B")
This statement returns 0, because the case does not match:
LastPos("BABE RUTH", "be")
This statement searches the leftmost 4 characters and returns 0, because the
only occurrence of RU is after position 4:
LastPos("BABE RUTH", "RU", 2)
See also Pos
Left
Description Obtains a specified number of characters from the beginning of a string.
Syntax Left ( string, n )
Return value
String. Returns the leftmost n characters in string if it succeeds and the empty
string (“”) if an error occurs.
If n is greater than or equal to the length of the string,
Left returns the entire
string. It does not add spaces to make the return value’s length equal to n.
Argument Description
string The string containing the characters you want
n A long specifying the number of characters you want