method

peek

v1_9_2_180 - Show latest stable - Class: StringScanner
peek(p1)
public

Extracts a string corresponding to string[pos,len], without advancing the scan pointer.

s = StringScanner.new('test string')
s.peek(7)          # => "test st"
s.peek(7)          # => "test st"