ruby/ext/strscan
Aaron Patterson 164e464b04 [ruby/strscan] Add a method for peeking and reading bytes as
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.

---------

873aba2e5d

Co-authored-by: Sutou Kouhei <kou@clear-code.com>
2024-02-26 15:54:54 +09:00
..
depend Update the depend files 2023-02-28 09:09:00 -08:00
extconf.rb Add function rb_reg_onig_match 2023-07-27 13:33:40 -04:00
strscan.c [ruby/strscan] Add a method for peeking and reading bytes as 2024-02-26 15:54:54 +09:00
strscan.gemspec Merge strscan-3.0.5 2022-12-09 16:36:22 +09:00