There’s @ReplaceSubstring in formula, there’s the FindAndReplace method for a NotesRichtextRange in LotusScript, but it doesn’t exist for a ordinary string.
This is the shortest (one line of code) function I can think of to build my own FindAndReplace. It can be a very old tip, or a very obvious one, I don’t know.
It’s really easy: I just split a string with the text-to-find as “splitter”, and join it back with the replacement text.
Function FindAndReplace(SourceText As String,FindText As String,ReplaceText As String) As String FindAndReplace=Join(Split(SourceText,FindText),ReplaceText) End Function
Gimme some feedback! Do you know this for years? Do you have another way of achieving this? Are there downsides?