MCPcopy Create free account
hub / github.com/ashkulz/NppFTP / cvtncat

Method cvtncat

UTCP/src/UT_StrOp.cpp:127–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125 }
126}
127void CUT_Str::cvtncat(wchar_t * dest, size_t size, const char * source, size_t count)
128{
129 *dest = _T('\0');
130 size_t len = strlen(source);
131 if(len > 0)
132 {
133 ++len;
134 _TCHAR *szConverted = new _TCHAR[len+1];
135 mbstowcs(szConverted, len, source, len);
136#if _MSC_VER >= 1400
137 _tcsncat_s(dest, size, szConverted, count);
138#else
139 UNREFERENCED_PARAMETER(size);
140 ::_tcsncat(dest, szConverted, count);
141#endif
142 delete [] szConverted;
143 }
144}
145void CUT_Str::cvtncat(char * dest, size_t size, const wchar_t * source, size_t count)
146{
147 *dest = '\0';

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected