method

get_byte

v1_8_6_287 - Show latest stable - Class: StringScanner
get_byte()
public

Scans one byte and returns it. This method is NOT multi-byte character sensitive. See also #getch.

  s = StringScanner.new('ab')
  s.get_byte         # => "a"
  s.get_byte         # => "b"
  s.get_byte         # => nil

  s = StringScanner.new("\244\242")
  s.get_byte         # => "\244"
  s.get_byte         # => "\242"
  s.get_byte         # => nil