Project

General

Profile

ยซ Previous | Next ยป 

Revision d5de1a57

Added by byroot (Jean Boussier) 10 months ago

[ruby/strscan] Implement #scan_integer to efficiently parse Integer
(https://github.com/ruby/strscan/pull/115)

Fix: https://github.com/ruby/strscan/issues/113

This allows to directly parse an Integer from a String without needing
to first allocate a sub string.

Notes:

The implementation is limited by design, it's meant as a first step,
only the most straightforward, based 10 integers are supported.

https://github.com/ruby/strscan/commit/6a3c74b4c8