Compartir a través de


CSimpleStringT::Append

Appends a CSimpleStringT object to an existing CSimpleStringT object.

void Append(
   const CSimpleStringT& strSrc 
);
void Append(
   PCXSTR pszSrc,
   int nLength
);
void Append(
   PCXSTR pszSrc
);

Parameters

  • strSrc
    The CSimpleStringT object to be appended.

  • pszSrc
    A pointer to a string containing the characters to be appended.

  • nLength
    The number of characters to append.

Remarks

Call this method to append an existing CSimpleStringT object to another CSimpleStringT object.

Example

The following example demonstrates the use of CSimpleStringT::Append.

CSimpleString str1(pMgr), str2(pMgr);

str1.SetString(_T("Soccer is"));
str2.SetString(_T(" an elegant game"));

str1.Append(str2);
ASSERT(_tcscmp(str1, _T("Soccer is an elegant game")) == 0);

Requirements

Header: atlsimpstr.h

See Also

Reference

CSimpleStringT Class

CSimpleStringT::AppendChar

Other Resources

CSimpleStringT Members