Method: String#scrub
- Defined in:
- string.c
#scrub(replacement_string = default_replacement) ⇒ Object #scrub {|bytes| ... } ⇒ Object
:include: doc/string/scrub.rdoc
11779 11780 11781 11782 11783 11784 11785 |
# File 'string.c', line 11779 static VALUE str_scrub(int argc, VALUE *argv, VALUE str) { VALUE repl = argc ? (rb_check_arity(argc, 0, 1), argv[0]) : Qnil; VALUE new = rb_str_scrub(str, repl); return NIL_P(new) ? str_duplicate(rb_cString, str): new; } |