before$

Syntax

result = BEFORE$(begin, text, search_key)

Arguments

text, search_key, result: text

begin: integer

Meaning

Search in string textfrom position begin for character or substring search_key and put all characters to the left of that character or substring in result.

If search_key is not found in text, the entire text is placed in result.

Example

string = before$(3, ’z,zzzz,yyyyy’ , ’,’)

Result

string is ‘z,zzzz’.

See also

AFTER$