Name

skip:toolbelt — ordinary primitive

Synopsis

FORTH
SKIP ( str len char -- str+i len-i )(); 
 ;

Description

Advance past leading characters in the specified string.

 : SKIP     
   >R  BEGIN  DUP WHILE  OVER C@ R@ =
        WHILE  1 /STRING  REPEAT THEN
    R> DROP ;

ie. skip leading characters c

   : SKIP  >R BEGIN DUP OVER C@ R@ = OR WHILE 
                    1- SWAP 1- SWAP REPEAT R> DROP ;