Method: String#replace
- Defined in:
- string.c
#replace(other_str) ⇒ String
Replaces the contents and taintedness of str with the corresponding values in other_str.
s = "hello" #=> "hello"
s.replace "world" #=> "world"
2246 2247 2248 |
# File 'string.c', line 2246 static VALUE rb_str_replace(str, str2) VALUE str, str2; |