MCPcopy Create free account
hub / github.com/SOUI2/soui / ConcatCopy

Method ConcatCopy

utilities/include/string/tstring.h:1233–1251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1231 // ? + TStringT
1232
1233 bool ConcatCopy(int nSrc1Len, const tchar* pszSrc1Data, int nSrc2Len, const tchar* pszSrc2Data)
1234 {
1235 // -- master concatenation routine
1236 // Concatenate two sources
1237 // -- assume that 'this' is a new TStringT object
1238
1239 bool bRet = true;
1240 int nNewLength = nSrc1Len + nSrc2Len;
1241 if (nNewLength != 0)
1242 {
1243 bRet = ReallocBuffer(nNewLength);
1244 if (bRet)
1245 {
1246 memcpy(m_pszData, pszSrc1Data, nSrc1Len * sizeof(tchar));
1247 memcpy(m_pszData + nSrc1Len, pszSrc2Data, nSrc2Len * sizeof(tchar));
1248 }
1249 }
1250 return bRet;
1251 }
1252 void ConcatInPlace(int nSrcLen, const tchar* pszSrcData)
1253 {
1254 // -- the main routine for += operators

Callers 1

operator+Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected