Subject: Replace Substrings
From: Jim Duffy [EMAIL PROTECTED]
Date: Thu, 7 Aug 2003 01:22:18 -0700
Does anyone know a way to search through a string for all instances of a
substring and replace them with a different substring?
For example:
string1 This[CR]is a [CR] Test
I need to replace all
Try this one, if you optimize it, let me know :
UInt16 StrReplace(Char *ioStr, UInt16 inMaxLen, const Char *inParamStr,
const Char *fndParamStr)
{
Char *found;
Boolean quit = false;
UInt16 occurences = 0;
UInt16 newLength;
UInt16 l1 = StrLen(fndParamStr);
UInt16 l2 = 0;
UInt16 l3 =