Excellent thank you. To note I am searching the docs but I see I did not
scroll far enough. I went to go find string-prefix in the doc and also found
string-contains and string-suffix in the same set of examples.
So you gave me an inadvertent trifecta of useful information.
It also means that
Hi Ken,
string-prefix? does exactly what you want.
> (define a "this") (define b "that") (define c "thisandthat")
> (string-prefix? c a)
#t
> (string-prefix? c b)
#f
https://docs.racket-lang.org/reference/strings.html#%28def._%28%28lib._racket%2Fstring..rkt%29._string-prefix~3f%29%29
Best,
Shu-H
2 matches
Mail list logo