U:RDoc::AnyMethod[iI"[]=:ETI"String#[]=;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"QElement Assignment---Replaces some or all of the content of str. The ;TI"Mportion of the string affected is determined using the same criteria as ;TI"QString#[]
. If the replacement string is not the same length as ;TI"Othe text it is replacing, the string will be adjusted accordingly. If the ;TI"Pregular expression or string is used as the index doesn't match a position ;TI"Qin the string, IndexError
is raised. If the regular expression ;TI"Rform is used, the optional second Integer
allows you to specify ;TI"Bwhich portion of the match to replace (effectively using the ;TI"CMatchData
indexing rules. The forms that take an ;TI"PInteger
will raise an IndexError
if the value is ;TI"Range form will raise a ;TI"RRangeError
, and the Regexp
and String
;TI"=will raise an IndexError
on negative match.;T:
@fileI"
string.c;T:0@omit_headings_from_table_of_contents_below0I"¶str[integer] = new_str
str[integer, integer] = new_str
str[range] = aString
str[regexp] = new_str
str[regexp, integer] = new_str
str[regexp, name] = new_str
str[other_str] = new_str
;T0[ I"(*args);T@FI"String;TcRDoc::NormalClassI"
scanf;T0