관리-도구
편집 파일: slice%21-i.yaml
--- !ruby/object:RI::MethodDescription aliases: [] block_params: comment: - !ruby/struct:SM::Flow::P body: Deletes the specified portion from <em>str</em>, and returns the portion deleted. The forms that take a <tt>Fixnum</tt> will raise an <tt>IndexError</tt> if the value is out of range; the <tt>Range</tt> form will raise a <tt>RangeError</tt>, and the <tt>Regexp</tt> and <tt>String</tt> 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