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 surrounding the scan pointer
Example #1 :
# Ruby code for StringScanner.inspect() method # loading StringScanner require 'strscan' # declaring StringScanner c = StringScanner.new("Mon Sep 12 2018 14:39") # inspect() method puts "String Scanner inspect form : #{c.inspect()}\n\n" |
chevron_right
filter_none
Output :
String Scanner inspect form : #
Example #2 :
# Ruby code for StringScanner.inspect() method # loading StringScanner require 'strscan' # declaring StringScanner c = StringScanner.new("hellogeeks") # inspect() method puts "String Scanner inspect form : #{c.inspect()}\n\n" |
chevron_right
filter_none
Output :
String Scanner inspect form : #
Recommended Posts:
- Ruby | Rational inspect() function
- Ruby | Hash inspect() function
- Ruby | Array class inspect() function
- Ruby | Time inspect function
- Ruby | Range inspect() function
- Ruby | Struct inspect() function
- Ruby | Regexp inspect() function
- Ruby | Symbol inspect function
- Ruby | String inspect Method
- Ruby | BigDecimal class inspect value
- Ruby | StringScanner check function
- Ruby | StringScanner check_until function
- Ruby | StringScanner clear function
- Ruby | StringScanner empty? function
- Ruby | StringScanner eos? function
- Ruby | StringScanner exist? function
- Ruby | StringScanner unscan function
- Ruby | StringScanner terminate function
- Ruby | StringScanner string function
- Ruby | StringScanner skip_until function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

