Xbasic

*ATC_MULTI Function

Syntax

Position as N = *ATC_MULTI(C search_string,C strings[,N occurrence])

Arguments

Position

The position of the firstof the multiple strings in the Find_Stringsargument. Zero if the characters were not found.

search_string

A CR-LF delimited string containing one or more strings to find.

strings

The character string to examine.

occurrence

Optional. Default = 1. The occurrence to find. Numeric

Description

Returns the position where one of a cr-lf delimited list of strings is found in another.

Discussion

The *ATC_MULTI() function returns the position in Search_In_Stringof the firstof the multiple strings in the Find_Stringsargument.

Example

? *atc_multi(comma_to_crlf("oranges,apples"),"This string contains apples and oranges") 
= 22 

? *atc_multi(comma_to_crlf("oranges,apples"),"This string contains apples and oranges",2) 
= 33 

? *atc_multi(comma_to_crlf("oranges,apples"),"This string contains apples and oranges",3) 
= 0

Limitations

The Find_Strings argument is case sensitive.

See Also