:start and :end with parse-integer
parse-integer takes :start and :end arguments, so you don’t have to extract integer subsequences from strings to pass them to parse-integer. For example, to parse date strings that look like “2011-10-01” into year, month, and date integers, you can do this:
(defun parse-date (string)
"Parse a date string in the form YYYY-MM-DD and return the
year, month, and day as multiple values."
(values (parse-integer string :start 0 :end 4)
(parse-integer string :start 5 :end 7)
(parse-integer string :start 8 :end 10)))