Rewrite integer parsing functions