RosettaCodeData/Task/String-matching/EchoLisp/string-matching.l

6 lines
214 B
Common Lisp

(string-suffix? "nette" "Antoinette") #t
(string-prefix? "Simon" "Simon & Garfunkel") #t
(string-match "Antoinette" "net") #t ;; contains
(string-index "net" "Antoinette") 5 ;; substring location