Class: StringScanner
Instance Method Summary collapse
Instance Method Details
#substr(start, end_) ⇒ String
7 8 9 10 11 12 13 |
# File 'lib/strscan/substr.rb', line 7 def substr(start, end_) old_pos = self.pos self.pos = start result = peek(end_ - start) self.pos = old_pos return result end |