Class: PHP::StringIOReader
- Inherits:
-
StringIO
- Object
- StringIO
- PHP::StringIOReader
- Defined in:
- lib/php_serialize.rb
Instance Method Summary collapse
-
#read_until(char) ⇒ Object
Reads data from the buffer until
charis found.
Instance Method Details
#read_until(char) ⇒ Object
Reads data from the buffer until char is found. The returned string will include char.
7 8 9 10 11 12 13 |
# File 'lib/php_serialize.rb', line 7 def read_until(char) val, cpos = '', pos if idx = string.index(char, cpos) val = read(idx - cpos + 1) end val end |