# String With Indexed Replacement

Grammarstring with characters from start to end replaced by replaceString
FlagsNative | Function

Replaces all characters that exist between two other characters in the string.

# Arguments

  • string — String
  • string — Replace String
  • int — Start
  • int — End

Returns — string

native string StringReplace(
	string s,
	string replace,
	int start,
	int end,
);

Category: String / Substrings

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L7987
StringReplace(lv_states, lv_newState, lv_index, lv_index)
// L7987
StringReplace(lv_states, lv_newState, lv_index, lv_index)

# mods/heroesdata.stormmod

HeroesLib.galaxy

// L4032
StringReplace(lv_name, lv_subName, (lv_length-lv_subLength+1), lv_length)