# String With Indexed Replacement
Grammar — string with characters from start to end replaced by replaceString
Flags —Native
|Function
Replaces all characters that exist between two other characters in the string.
# Arguments
string
— Stringstring
— Replace Stringint
— Startint
— End
Returns — string
native string StringReplace(
string s,
string replace,
int start,
int end,
);
# Related
Category: String / Substrings
- [F] —
string
— Word Of String — ( StringWord ) - [F] —
string
— Substring — ( StringSub ) - [F] —
int
— Position Of Substring — ( StringFind ) - [F] —
bool
— String Containment — ( StringContains ) - [F] —
string
— String With Indexed Replacement — ( StringReplace ) - [F] —
string
— String With Search Replacement — ( StringReplaceWord ) - [F] —
text
— Text With Search Replacement — ( TextReplaceWord )
# Examples
# campaigns/liberty.sc2campaign
// L7987
StringReplace(lv_states, lv_newState, lv_index, lv_index)
// L7987
StringReplace(lv_states, lv_newState, lv_index, lv_index)
# mods/heroesdata.stormmod
// L4032
StringReplace(lv_name, lv_subName, (lv_length-lv_subLength+1), lv_length)