Hey,
The ruby equiv of str_replace is gsub.
So
"Hello World".gsub("Hello", "Bye")
http://corelib.rubyonrails.org/classes/String.html#M001538
~Rohith
On 6/22/06, Digital Pardoe <digital.pardoe@gmail.com>
wrote:>
> I''ve been searching for ages and not come up with anything on the
> internet. I was wondering if there is a Rails equiv. for the PHP
> function str_replace. For example;
>
> variable_for_new_string("value_to_repace",
"string_to_replace_with",
> "string_to_perform_modification_to")
>
> Thanks in advance for any help.
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060622/6f1cb245/attachment.html