search for: newword

Displaying 2 results from an estimated 2 matches for "newword".

Did you mean: netword
2007 Feb 20
5
Create a hyphen-separated set of letters derived from a string - How to?
Hi, This is such a trivial programming issue, but I can''t find a way to transform, say ''abc'' to ''a-b-c'' without using pattern matching. Any ideas? Thanks in Advance, Richard --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post
2009 Apr 23
2
Replace the first word of a string
Does anybody have a good starting point for how to read the first word of a string and then, based on several defined pairs, swap it? I''ve been considering using something like @split = @message.split(''-'') if @split[0] == "word" ... elsif @split[0] == "otherword" ... end Even if this is the best way to do it, I''m not sure how to replace