I submitted a String replace function to replace one or many charracters in a string
You could see it there
viewtopic.php?f=5&t=49295#p118970
ReplaceStr(Eur.Usd,".","_"); = "Eur_Usd"
Original String: Eur.Usd
To be replace: "."
To be replace by:"_"
ReplaceStr("Hello, my name is Martin","Martin","Paul") = "Hello my name is Paul"
//ReplaceSTR will replace a series of characters with the new one
//By Martin Theriault December 29 2015
Input:
InputString(String),
Lookfor (String),
ReplaceBy (String);
Var:
Position(-1),
LengthInput (0),
Length_ReplaceBy (0),
Length_LookFor (0),
Temp_Length (0),
TempString ("");
LengthInput = strlen(InputString);
Length_Lookfor = strlen(Lookfor);
Length_ReplaceBy = StrLen(ReplaceBy);
Position = Instr(InputString,LookFor);
TempString =LeftStr(inputString,(position-1 ))+ replaceby;
Temp_Length = StrLen(TempString);
TempString = tempstring + RightStr(InputString, (LengthInput -(position + length_lookfor -1)));
replacestr = Tempstring;
print ("exit>: , ", replacestr);