RosettaCodeData/Task/Substring/Scheme/substring.ss
Ingy döt Net 68f8f3e56b all tasks
2013-04-11 01:07:29 -07:00

18 lines
316 B
Scheme

(define s "Hello, world!")
(define n 5)
(define m (+ n 6))
(display (substring s n m))
(newline)
(display (substring s n))
(newline)
(display (substring s 0 (- (string-length s) 1)))
(newline)
(display (substring s (string-index s #\o) m))
(newline)
(display (substring s (string-contains s "lo") m))
(newline)