Mega Code Archive

 
Categories / Ruby / String
 

Gsub method that performs a global substitution (like a search and replace) upon the string

"this is a test".gsub(/t/, 'X')