Tokenize a string: Difference between revisions

m
Line 244:
;;; If comma
if str(i) = `,` then
;;; PrepedPrepend word (substring) to list
cons(substring(j, i - j, str), ls) -> ls;
i + 1 -> j;
endif;
endfor;
;;; PrepedPrepend final word (if needed)
if j <= length(str) then
cons(substring(j, length(str) - j + 1, str), ls) -> ls;
Anonymous user