strbreak( base, start, charset )


Parameters

  Type Description
base string string to search through
start numeric starting offset in base
charset string characters to find

_result

Set to a numeric value that is an offset into base.

Descriptions

Finds the offset of the first character in base that matches any character in the charset string. The search for characters in charset is started at the offset specified by the start parameter. The search is case sensitive. The strbreak command sets _result to the numeric offset of the first character in base that matches any character in charset. If no characters after position start in base are members of charset _result is set to -1. If characters found in charset occur before the start position they will not be found. The start parameter is zero based. To search from the beginning of base use a value of 0

In the example below the first print command appends 3 to the print log for the matching 's' in "This". The second print command appends -1 to the print log since the matching character is before the starting position.

base = "This is a message"
strbreak( base, 0, "qrst" )
print( _result )

strbreak( base, 2, "T" )
print( _result )

See Also

strspan, strlen, strins, strmid, strfind, stricmp, strrev, strtrim, strlower, strupper