.BREAK - stop on matching characters in a string.

Usage:

B:
   pos = .break(string, i, stop);
/* C users use "strpbrk" */

Where:

string
is an ordinary B string.
i
gives the position in "string" where scanning should begin. Beginning with the initial character of the string corresponds to an "i" of zero; beginning with the next character corresponds to an "i" of one, and so on.
stop
is a B string containing the characters to stop on.
pos
is the position of the first character found in "string" which is in "stop".

Description:

.BREAK scans through "string", stopping at any character found in "stop". The scan begins with the i'th character of "string". The value returned by .BREAK gives the position where the scan stopped, i.e. the first position after "i-1" which contains a character in "stop". "stop" always includes '*e' automatically.

See Also:

expl b lib .span

expl b lib scan

Copyright © 1996, Thinkage Ltd.