CRegexpT::Replace
Return: Content | Prev
PrepareMatch
| Next: ReleaseContext
CRegexpT::Replace
CHART * Replace(const CHART * str,
const CHART * rplto, int start = -1,
int ntimes = -1) const;
Return Value
The new string after replace.
The new string is allocated during replace operation. After all, this new string must be
released through CRegexpT::ReleaseString explicitly.
Parameters
str
The original string to be replaced.
rplto
"Replace to" sub-string, will be used to replace
what matched. Refer to
replace syntax.
start
Start position to begin to replace, default (-1)
means to start position determine automatically.
ntimes
Replace times, default (-1) means to replace all.
Remarks
To replace matched sub-string into another sub-string.
The new string returned must be released explicitly.
|