(rontolisp) docs
← Numbers and predicates

parse-long

(parse-long s)

Parses decimal digits with an optional leading -/+ and answers a Long value, or nil when the parse fails: the oracle's Long/valueOf grammar, without host calls, so it runs on every backend (a portable program had no number parser but read-string). Digits may be ASCII or any Unicode decimal digit; past the long range, or with any other spelling, the answer is nil. A non-string is the oracle's IllegalArgumentException (Expected string, got ...). As a value a one-argument function.