Class: PHP::StringIOReader

Inherits:
StringIO
  • Object
show all
Defined in:
lib/php_serialize.rb

Instance Method Summary collapse

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