D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
String
/
Filename :
scrub-i.ri
back
Copy
U:RDoc::AnyMethod[iI" scrub:ETI"String#scrub;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"GReturns a copy of +self+ with each invalid byte sequence replaced ;TI"'by the given +replacement_string+.;To:RDoc::Markup::BlankLine o; ; [I"IWith no block given and no argument, replaces each invalid sequence ;TI")with the default replacement string ;TI"E(<tt>"�"</tt> for a Unicode encoding, <tt>'?'</tt> otherwise):;T@o:RDoc::Markup::Verbatim; [I"s = "foo\x81\x81bar" ;TI"!s.scrub # => "foo��bar" ;T:@format0o; ; [I"BWith no block given and argument +replacement_string+ given, ;TI"5replaces each invalid sequence with that string:;T@o;; [I"="foo\x81\x81bar".scrub('xyzzy') # => "fooxyzzyxyzzybar" ;T; 0o; ; [I"GWith a block given, replaces each invalid sequence with the value ;TI"of the block:;T@o;; [I"8"foo\x81\x81bar".scrub {|bytes| p bytes; 'XYZZY' } ;TI"# => "fooXYZZYXYZZYbar" ;T; 0o; ; [I"Output:;T@o;; [I""\x81" ;TI""\x81";T; 0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"escrub(replacement_string = default_replacement) -> new_string scrub{|bytes| ... } -> new_string ;T0[ I"(*args);T@/FI"String;TcRDoc::NormalClass00