method

peek

v1_8_6_287 - 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"