- Found in:
- Dylbills PE
stringfunctionStringReplace(stringTargetStr, stringSearchStr, stringReplaceStr, intCount=0, intStartIndex=0)Global
Description
Documentation Comment
Replace instances of the SearchStr with the ReplaceStr in the TargetStr
Default count = 0 which means replace all instances. Otherwise only replace the Count number.
Example:
String MyString = "A Yes, B Yes, C Yes"
String MyStringB = StringReplace(MyString, "Yes", "No")
String MyStringC = StringReplace(MyString, "Yes", "No", 2)
MyStringB == "A No, B No, C No"
MyStringC == "A No, B No, C Yes"
Requires SKSE
Parameters
stringTargetStr
stringSearchStr
stringReplaceStr
intCount=0
intStartIndex=0
Examples
Auto-Generated Example
string myString__TargetStr
string myString__SearchStr
string myString__ReplaceStr
int myInt__Count
int myInt__StartIndex
string returnedValue = DbMiscFunctions.StringReplace(myString__TargetStr, myString__SearchStr, myString__ReplaceStr, myInt__Count, myInt__StartIndex)