MCPcopy Create free account
hub / github.com/WinMerge/winmerge / CrossConvertToStringA

Function CrossConvertToStringA

Src/Common/unicoder.cpp:671–681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

669 */
670#ifndef UNICODE
671String CrossConvertToStringA(const char* src, unsigned srclen, int cpin, int cpout, bool * lossy)
672{
673 int wlen = srclen * 2 + 6;
674 int clen = wlen * 2 + 6;
675 String str;
676 str.resize(clen);
677 char* cbuff = &*str.begin();
678 int nbytes = CrossConvert(src, srclen, cbuff, clen, cpin, cpout, lossy);
679 str.resize(nbytes);
680 return str;
681}
682#endif
683
684/**

Callers 1

maketstringFunction · 0.85

Calls 3

CrossConvertFunction · 0.85
resizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected