U:RDoc::AnyMethod[iI"tr:ETI"String#tr;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"OReturns a copy of +str+ with the characters in +from_str+ replaced by the ;TI"Hcorresponding characters in +to_str+. If +to_str+ is shorter than ;TI"O+from_str+, it is padded with its last character in order to maintain the ;TI"correspondence.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-"hello".tr('el', 'ip') #=> "hippo" ;TI"-"hello".tr('aeiou', '*') #=> "h*ll*" ;TI"-"hello".tr('aeiou', 'AA*') #=> "hAll*" ;T: @format0o; ; [I"NBoth strings may use the c1-c2 notation to denote ranges of ;TI"Ocharacters, and +from_str+ may start with a ^, which denotes ;TI"(all characters except those listed.;T@o; ; [I"-"hello".tr('a-y', 'b-z') #=> "ifmmp" ;TI"-"hello".tr('^aeiou', '*') #=> "*e**o" ;T; 0o; ; [I"CThe backslash character \\ can be used to escape ;TI"I^ or - and is otherwise ignored unless it ;TI"Lappears at the end of a range or the end of the +from_str+ or +to_str+:;T@o; ; [I"9"hello^world".tr("\\^aeiou", "*") #=> "h*ll**w*rld" ;TI"9"hello-world".tr("a\\-eo", "*") #=> "h*ll**w*rld" ;TI" ;TI"8"hello\r\nworld".tr("\r", "") #=> "hello\nworld" ;TI"9"hello\r\nworld".tr("\\r", "") #=> "hello\r\nwold" ;TI"8"hello\r\nworld".tr("\\\r", "") #=> "hello\nworld" ;TI" ;TI","X['\\b']".tr("X\\", "") #=> "['b']" ;TI")"X['\\b']".tr("X-\\]", "") #=> "'b'";T; 0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"+str.tr(from_str, to_str) => new_str ;T0[I" (p1, p2);T@0FI" String;TcRDoc::NormalClassI" scanf;T0