I was just thinking that something that parsed the value starting at a particular position (default = 1), and possibly an ending position,
which could return a tuple with status, the position past the last character used, and the value (if it fits in the type),
could be used to implement other simpler parse methods.
Different statuses could be: 1) valid value returned, all characters consumed 2) valid value returned, position after last character returned also, 3) valid (syntactic) value found, doesn't fit in requested type, all characters consumed, 4) same as previous, position after last character returned, 5) no valid value found (position updated [useful if, as in your PR, skipping whitespace is allowed])
-Scott