Tag Archives: string functions

String Replacement in Ruby

How can you replace strings in Ruby? There are a couple of options; there’s the tr function, which takes two sets of characters, and substitutes them; and there’s the gsub method, which makes a global replacement based on a regular expression. Powerful stuff! Continue reading

Posted in Development | Tagged , , | Comments Off