&keystart end radix junk-allowed → integer, pos
parse-integer parses an integer in the specified radix from the substring of string delimited by start and end.
parse-integer expects an optional sign (
-) followed by a a non-empty sequence of digits to be interpreted in the specified radix. Optional leading and trailing whitespace is ignored.
parse-integer does not recognize the syntactic radix-specifier prefixes
R, nor does it recognize a trailing decimal point.
If junk-allowed is false, an error of type parse-error is signaled if substring does not consist entirely of the representation of a signed integer, possibly surrounded on either side by whitespace characters.
The second value is either the index into the string of the delimiter that terminated the parse, or the upper bounding index of the substring if the parse terminated at the end of the substring (as is always the case if junk-allowed is false).
(parse-integer "123" :start 1 :radix 5)
(parse-integer "no-integer" :junk-allowed t)