OK, dann wollen wir mal. Hier als Beispieö die Funktion ReplaceSubstring
zunächst Javascript
function replaceSubstring (inputString, badString,
goodString, caseSensitive) {
fixedReplace = "";
UI = inputString;
UB = badString;
if ((caseSensitive != 1) && (caseSensitive != true)) {
UI = inputString.toUpperCase();
UB = badString.toUpperCase();
}
badEnd = -1;
badLoc = UI.indexOf(UB);
if (badLoc != -1) {
for (x=1; (badLoc != -1); x++) {
fixedReplace = fixedReplace +
inputString.substring((badEnd +
1), badLoc) + goodString
badEnd = badLoc + UB.length - 1;
badLoc = UI.indexOf(UB, (badLoc + 1)); }
fixedReplace = fixedReplace +
inputString.substring((badEnd + 1),
inputString.length); }
else { fixedReplace = inputString; }
return fixedReplace;
}
und jetzt in LotusScript
Function ReplaceSubstring(sSource As String, sFrom As String, sTo As String) As String
Dim sResult As String
Dim i As Integer, iLenFrom As Integer, iLenRslt As Integer
i=0
iLenFrom=Len(sFrom)
sResult=sSource
Do While(i < Len(sResult))
i=i+1
If Mid$(sResult, i, iLenFrom ) = sFrom Then
iLenRslt=Len(sResult)
sResult=Left$(sResult, (i-1)) + sTo + Right$(sResult, iLenRslt - ( (i-1) + ( iLenFrom ) ) )
End If
Loop
ReplaceSubstring=sResult
End Function
und letztendlich als @Formel
@ReplaceSubstring(Quelliste ; ÄndernVonListe ; ÄndernInListe)
eknori