Displaying 1 result from an estimated 1 matches for "qpgq".
Did you mean:
qpgp
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