> I have string: "xxx | yyy | zzz | ddd"
>
> I need to split it to: "xxx", "yyy", "zzz" and "ddd",
> make link to every word like: <a href="xxx">xxx</a>
>
> So result must by:
>
> from this: "xxx | yyy | zzz | ddd" to this:
>
> "<a href="xxx">xxx</a>, <a href="yyy">yyy</a>, <a href="zzz">zzz</
> a>, <a
> href="ddd">ddd</a>"
>
> How can I do it?
"xxx | yyy | zzz | ddd".split()....map{}....join()
I'll let you figure out what goes into the () and {}'s :)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---