Skip to content

Tag Archives: Ruby String Scanner-class

StringScanner#pointer() : pointer() is a StringScanner class method which returns the byte position of the scan pointer Syntax: StringScanner.pointer() Parameter: StringScanner values Return: the byte… Read More
StringScanner#peep() : peep() is a StringScanner class method which returns a string corresponding to string[pos, len]. Syntax: StringScanner.peep() Parameter: StringScanner values len – length of… Read More
StringScanner#peek() : peek() is a StringScanner class method which returns a string corresponding to string[pos, len]. Syntax: StringScanner.peek() Parameter: StringScanner values len – length of… Read More
StringScanner#matched_size() : matched_size() is a StringScanner class method which returns the size of the most recent match Syntax: StringScanner.matched_size() Parameter: StringScanner values Return: the size… Read More
StringScanner#matched?() : matched?() is a StringScanner class method which checks whether the last match was successful. Syntax: StringScanner.matched?() Parameter: StringScanner values Return: true – if… Read More
StringScanner#matched() : matched() is a StringScanner class method which returns the last matched string. Syntax: StringScanner.matched() Parameter: StringScanner values Return: the last matched string. Example… Read More
StringScanner#match?() : match?() is a StringScanner class method which checks whether the given pattern is matched from the current scan pointer. Syntax: StringScanner.match?() Parameter: StringScanner… Read More
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:… Read More
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… Read More
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… Read More
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… Read More
StringScanner#restsize() : restsize() is a StringScanner class method which returns the size of the bytes after the string position. Syntax: StringScanner.restsize() Parameter: StringScanner values Return:… Read More
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… Read More
StringScanner#reset() : reset() is a StringScanner class method which reset the scan pointer (index 0) and clear matching data. Syntax: StringScanner.reset() Parameter: StringScanner values Return:… Read More
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… Read More