B
Basile Starynkevitch [news]
Dear All
I am a novice in Ruby, and I appologize for asking such a basic
questions, but I did not found its answer in the Ruby in a Nutshell
book and after 10 minutes of Googling.
What is is opposite of inspect for strings, ie the function parsing
strings external representation (as strings)?
i.e. I do know that "a\tb".inspect gives the 6 character string
"\"a\\tb\"" but what is the method or function that, given the
argument "\"a\\tb\"" produces the "a\tb" string of 3 characters?
Also how can I easily parse (ie read) from a file such a string like
the output of inspect?
Again, apologies for asking probably a FAQ (which I didn't found in)
Regards.
I am a novice in Ruby, and I appologize for asking such a basic
questions, but I did not found its answer in the Ruby in a Nutshell
book and after 10 minutes of Googling.
What is is opposite of inspect for strings, ie the function parsing
strings external representation (as strings)?
i.e. I do know that "a\tb".inspect gives the 6 character string
"\"a\\tb\"" but what is the method or function that, given the
argument "\"a\\tb\"" produces the "a\tb" string of 3 characters?
Also how can I easily parse (ie read) from a file such a string like
the output of inspect?
Again, apologies for asking probably a FAQ (which I didn't found in)
Regards.