TRANSLATE ('abcd', 'ab', '12') ==> '12cd'
TRANSLATE ('12345', '15', 'xx') ==> 'x234x'
TRANSLATE ('grumpy old possum', 'uot', '%$*') ==> 'gr%mpy $ld p$ss%m'
TRANSLATE ('my language needs the letter e', 'egms', 'X')
==>
'y lanuaX nXXd thX lXttXr X';
TRANSLATE ('please go away', 'a', NULL) ==> NULLREPLACE ('CAT CALL', 'C') ==> 'AT ALL'
REPLACE ('Zero defects in period 99 reached 99%!', '99', '100')
==>
'Zero defects in period 100 reached 100%!'
REPLACE ('this that and the other', 'th', 'z') ==> 'zis zat and ze ozer'看完这些你应该明白了吧?
TRANSLATE ('12345', '15', 'xx') ==> 'x234x'
TRANSLATE ('grumpy old possum', 'uot', '%$*') ==> 'gr%mpy $ld p$ss%m'
TRANSLATE ('my language needs the letter e', 'egms', 'X')
==>
'y lanuaX nXXd thX lXttXr X';
TRANSLATE ('please go away', 'a', NULL) ==> NULLREPLACE ('CAT CALL', 'C') ==> 'AT ALL'
REPLACE ('Zero defects in period 99 reached 99%!', '99', '100')
==>
'Zero defects in period 100 reached 100%!'
REPLACE ('this that and the other', 'th', 'z') ==> 'zis zat and ze ozer'看完这些你应该明白了吧?
replace是取代
例子见楼上的哦。