Jump to content

String matching: Difference between revisions

Line 1,425:
(ends-with str "ghi")
 
;; functionfind to listall positions of pattern inside str
(define (positionsfind-all-pos pattern str)
(let ((idx -1) (pos '()))
(while (setq idx (find pattern str 0 (+ idx 1)))
(push idx pos -1))))
 
(positionsfind-all-pos "bc" str)</lang>
 
=={{header|Nimrod}}==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.