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
char
is found.
Instance Method Details
#read_until(char) ⇒ Object
Reads data from the buffer until char
is found. The returned string will include char
.
9 10 11 12 13 14 15 |
# File 'lib/php_serialize.rb', line 9 def read_until(char) val, cpos = '', pos if idx = string.index(char, cpos) val = read(idx - cpos + 1) end val end |