Replace gsub with tr where possible
Merge pull request #3505 from vladimir-tikhonov/replace-gsub-with-tr

Replace gsub with tr