mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 21:14:23 +02:00
![]() integers
(https://github.com/ruby/strscan/pull/89)
This commit adds `scan_byte` and `peek_byte`. `scan_byte` will scan the
current byte, return it as an integer, and advance the cursor.
`peek_byte` will return the current byte as an integer without advancing
the cursor.
Currently `StringScanner#get_byte` returns a string, but I want to get
the current byte without allocating a string. I think this will help
with writing high performance lexers.
---------
|
||
---|---|---|
.. | ||
depend | ||
extconf.rb | ||
strscan.c | ||
strscan.gemspec |