文字を置換
Top > Ruby [2.2.2] > tr
p "1234567890".tr("3","0") # "1204567890" p "1234567890".tr("1-5","0") # "0000067890" p "achaporutepiipo".tr("a-c","A-C") # "AChAporutepiipo" p "achaporutepiipo".tr("a,p","A,P") # "AchAPorutePiiPo" p "acha,porute,piipo".tr(",","-") # "acha-porute-piipo"