--- !ruby/object:RI::MethodDescription
aliases: []
block_params:
comment:
- !ruby/struct:SM::Flow::P
body: Deletes the specified portion from str, and returns the portion deleted. The forms that take a Fixnum will raise an IndexError if the value is out of range; the Range form will raise a RangeError, and the Regexp and String forms will silently ignore the assignment.
- !ruby/struct:SM::Flow::VERB
body: " string = "this is a string"\n string.slice!(2) #=> 105\n string.slice!(3..6) #=> " is "\n string.slice!(/s.*t/) #=> "sa st"\n string.slice!("r") #=> "r"\n string #=> "thing"\n"
full_name: String#slice!
is_singleton: false
name: slice!
params: |
str.slice!(fixnum) => fixnum or nil
str.slice!(fixnum, fixnum) => new_str or nil
str.slice!(range) => new_str or nil
str.slice!(regexp) => new_str or nil
str.slice!(other_str) => new_str or nil
visibility: public