gsub method that performs a global substitution (like a search and replace) upon the string : gsub « String « Ruby
- Ruby
- String
- gsub
gsub method that performs a global substitution (like a search and replace) upon the string
"this is a test".gsub(/t/, 'X')
Related examples in the same category