B
Ben
I would like to use ruby to do interesting manipulations of strings.
Ideally, I'd be able to copy multiple lines of text from a text editor,
paste those lines of text into irb (as a string), manipulate that
string, copy the result, and then paste it back into the original
editor. I know that sounds like a lot of work, but the manipulations I
want to do aren't trivial enough to do with the standard find/replace
features of most editors.
For instance, (this is kind of contrived) but say I wanted to take any
answers to this post, and make the first and last letter of each word
uppercase or something and then save that text in an email.
Is there a way to paste multiple lines of text into irb and save them
as a single string value? I tried using 'here documents' but that
didn't work.
By the way, I'm using FXirb since I'm runnign windows and cmd.exe isn't
great about copying/pasting in general. Thanks.
Ben
Ideally, I'd be able to copy multiple lines of text from a text editor,
paste those lines of text into irb (as a string), manipulate that
string, copy the result, and then paste it back into the original
editor. I know that sounds like a lot of work, but the manipulations I
want to do aren't trivial enough to do with the standard find/replace
features of most editors.
For instance, (this is kind of contrived) but say I wanted to take any
answers to this post, and make the first and last letter of each word
uppercase or something and then save that text in an email.
Is there a way to paste multiple lines of text into irb and save them
as a single string value? I tried using 'here documents' but that
didn't work.
By the way, I'm using FXirb since I'm runnign windows and cmd.exe isn't
great about copying/pasting in general. Thanks.
Ben