###Function###
StringReplace

###Description###
Replaces substrings in a string.

###Syntax###
StringReplace ( "string", "searchstring" or start, "replacestring" [, count [, casesense]] )


###Parameters###
@@ParamTable@@
string
	The string to evaluate.
searchstring
	The substring to search for or the character position to start the replacement.
replacestring
	The replacement string.
count
	[optional] The number of times to replace the searchstring.
	0 = all searchstrings will be replaced (default)  [count < 0 also replaces all instances]
casesense
	[optional] Flag to indicate if the search operation should be case sensitive.
	0 = not case sensitive (default)
	1 = case sensitive
@@End@@


###ReturnValue###
Returns the new string, the number of replacements performed is stored in @extended.


###Remarks###
The search/replace is performed left-to-right.  Thus, StringReplace("aaa", "aa", "bb") returns "bba"

If the start method is used the count and casesense parameters are ignored. If the replacestring cannot be stored a blank string is returned and @error is set to 1.

###Related###
String, StringLeft, StringLen, StringLower, StringMid, StringRight, StringTrimLeft, StringTrimRight, StringUpper


###Example###
@@IncludeExample@@
