Str.tr("^", "y")

str.tr("^", “y”) e$B$H$7$?$H$-$K!"e(Bstr e$B$,e(B “a” e$B$J$ie(B a
e$B$,$=$N$^$^e(B
e$B;D$k$N$K!“e(B"aa” e$B$J$ie(B “yy” e$B$K$J$j$^$9!#e(B

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

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

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