.SPAN - skip matching characters in a string.

Usage:

B:
   pos = .span(string, i, skip);
/* C users use "strspn" */

Where:

string
points to an ordinary 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.
skip
points to a string containing the characters to be skipped.
pos
is the position of the first character found in "string" which is not in "skip".

Description:

.SPAN scans through "string", skipping over any characters found in "skip". The scan begins with the i'th character of "string". The value returned by .SPAN gives the position where the scan stopped, i.e. the first position after "i-1" which contains a character not in "skip".

The '*e' is not considered to be part of "skip".

See Also:

expl b lib .break

expl b lib scan

Copyright © 1996, Thinkage Ltd.