Ruby | StringScanner get_byte function Last Updated : 09 Dec, 2019 Comments Improve Suggest changes Like Article Like Report StringScanner#get_byte() : get_byte() is a StringScanner class method which returns the byte of pointer on the StringScanner. Syntax: StringScanner.get_byte() Parameter: StringScanner values Return: the byte of pointer on the StringScanner. Example #1 : Ruby # Ruby code for StringScanner.get_byte() method # loading StringScanner require 'strscan' # declaring StringScanner c = StringScanner.new("Mon Sep 12 2018 14:39") # get_byte() method puts "String Scanner get_byte form : #{c.get_byte()}\n\n" # get_byte() method puts "String Scanner get_byte form : #{c.get_byte()}\n\n" # get_byte() method puts "String Scanner get_byte form : #{c.get_byte()}\n\n" Output : String Scanner get_byte form : M String Scanner get_byte form : o String Scanner get_byte form : n Example #2 : Ruby # Ruby code for StringScanner.get_byte() method # loading StringScanner require 'strscan' # declaring StringScanner c = StringScanner.new("hellogeeks") # get_byte() method puts "String Scanner get_byte form : #{c.get_byte()}\n\n" # get_byte() method puts "String Scanner get_byte form : #{c.get_byte()}\n\n" # get_byte() method puts "String Scanner get_byte form : #{c.get_byte()}\n\n" Output : String Scanner get_byte form : h String Scanner get_byte form : e String Scanner get_byte form : l Comment More infoAdvertise with us Next Article Ruby | StringScanner rest function M mayank5326 Follow Improve Article Tags : Ruby Ruby-Methods Ruby String Scanner-class Similar Reads Ruby | StringScanner getch function StringScanner#getch() : getch() is a StringScanner class method which returns the byte of pointer on the StringScanner. Syntax: StringScanner.getch() Parameter: StringScanner values Return: the byte of pointer on the StringScanner. Example #1 : Ruby # Ruby code for StringScanner.getch() method # loa 1 min read Ruby | StringScanner rest function StringScanner#rest() : rest() is a StringScanner class method which returns the ârestâ of the string (i.e. everything after the scan pointer). Syntax: StringScanner.rest() Parameter: StringScanner values Return: the ârestâ of the string (i.e. everything after the scan pointer). Example #1 : Ruby # R 1 min read Ruby | StringScanner rest? function StringScanner#rest?() : rest?() is a StringScanner class method which checks if there is more data in the string Syntax: StringScanner.rest?() Parameter: StringScanner values Return: true if there is more data in the string otherwise return false Example #1 : Ruby # Ruby code for StringScanner.rest? 1 min read Ruby | StringScanner getbyte function StringScanner#getbyte() : getbyte() is a StringScanner class method which returns the byte of pointer on the StringScanner. Syntax: StringScanner.getbyte() Parameter: StringScanner values Return: the byte of pointer on the StringScanner. Example #1 : Ruby # Ruby code for StringScanner.getbyte() meth 1 min read Ruby | StringScanner eos? function StringScanner#eos?() : eos?() is a StringScanner class method which checks whether the scan pointer is at the end of the string. Syntax: StringScanner.eos?() Parameter: StringScanner values Return: true if the scan pointer is at the end of the string otherwise return false Example #1 : Ruby # Ruby c 1 min read Ruby | StringScanner inspect function StringScanner#inspect() : inspect() is a StringScanner class method which returns string that represents the StringScanner object showing different values. Syntax: StringScanner.inspect() Parameter: StringScanner values Return: - the current position - the size of the string - the characters surroun 1 min read Like