Str.tr("^a", "z")'

str.tr("^a", “z”) e$B$H$7$?>l9g$K!"e(Bstr e$B$,e(B “a” e$B$J$ie(B “z”
e$B$K$J$k$Ne(B
e$B$K!“e(B"aa” e$B$J$ie(B “aa”
e$B$N$^$^$K$J$k$N$OJQ$G$O$J$$$G$7$g$&$+!#e(B

% ./ruby -ve ‘p “a”.tr("^a", “z”)’
ruby 1.9.0 (2008-05-10 revision 16347) [i686-linux]
“z”
% ./ruby -ve ‘p “aa”.tr("^a", “z”)’
ruby 1.9.0 (2008-05-10 revision 16347) [i686-linux]
“aa”

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs