?string-head ( str head ignore-case -- newstr ? ) (original) (raw)

?string-head ( str head ignore-case -- newstr ? )

Vocabulary
parser-combinators

Inputs

str an object
head an object
ignore-case an object

Outputs

newstr an object
? an object

Definition

USING: kernel sequences ;

IN: parser-combinators

: ?string-head ( str head ignore-case -- newstr ? )
[ 2dup ] dip string-head?
[ length tail-slice t ] [ drop f ] if ;