Function CSPWString::Replace() Description: Replaces the occurences of a substring in a string with another substring. The number of maximum first occurences to be replaced can be optionally specified.
| Prototype: unsigned long Replace(const CSPString& strFind, const CSPString& strReplace, unsigned long ulFirst = 0); Arguments: const CSPString& strFind [IN] The substring to find. const CSPString& strReplace [IN] The substring to replace with. unsigned long ulFirst = 0 [IN] The maximum number of first occurences to replace. Return value: The number of substring occurences replaced. Remarks: If ulFirst is 0, all the substring occurences are replaced. Examples: CSPWString wstrText = L"1 plus 34 plus 12"; wstrText.Replace( L"plus", L"+" ); See also: member function Find()
CSPWString | Basic classes | Class Categories | Online help home | Back
www.micronovae.com Copyright © 2002 - 2004 Micronovae Ltd