cscan

 Scan string at addr1/n1 for the first c, leaving addr1/n2, char at n2 is first non-c character

Stackeffects

( addr1 n1 c -- addr1 n2 )
R( -- )

Definition

: cscan
   swap    dup    >r    0    (?do)
PFA_CSCAN1:
   over    i    +    c@    over    =
(?branch) PFA_CSCAN2
   drop    i    unloop    r>    drop    exit
PFA_CSCAN2:

(loop) PFA_CSCAN1 ; ( -- addr1 c)

PFA_CSCAN3:
   drop    r>
;

Used by

parse word