CHString::operator+=
[The CHString class is part of the WMI Provider Framework which is now considered in final state, and no further development, enhancements, or updates will be available for non-security related issues affecting these libraries. The MI APIs should be used for all new development.]
The += concatenation operator joins characters to the end of this string. The operator accepts another CHString object, a character pointer, or a single character.
const CHString& operator +=(
const CHString& string )
throw( CHeap_Exception );
const CHString& operator +=(
WCHAR ch )
throw( CHeap_Exception );
const CHString& operator +=(
LPCWSTR lpsz )
throw( CHeap_Exception );
const CHString operator +=(
char ch )
throw( CHeap_Exception );
Parameters
-
string
-
A CHString string that concatenates to this string.
-
ch
-
A character to concatenate to this string.
-
lpsz
-
Pointer to a NULL-terminated string to concatenate to this string.
Remarks
Be aware that memory exceptions can occur whenever you use this concatenation operator because new storage may be allocated for characters added to this CHString object.
Examples
The following example shows the use of CHString::operator +=:
CHString s( L"abc" );
assert( ( s += L"def" ) == L"abcdef" );
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista |
Minimum supported server |
Windows Server 2008 |
Header |
|
Library |
|
DLL |
|