MCPcopy Create free account
hub / github.com/Scobalula/Greyhound / CopyFormatCharacter

Function CopyFormatCharacter

src/External/CascLib/test/TLogHelper.cpp:111–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111wchar_t * CopyFormatCharacter(wchar_t * szBuffer, const wchar_t *& szFormat)
112{
113 static const wchar_t * szStringFormat = L"%s";
114 static const wchar_t * szUint64Format = fmt_I64u_t;
115
116 // String format
117 if(szFormat[0] == '%')
118 {
119 if(szFormat[1] == 's')
120 {
121 wcscpy(szBuffer, szStringFormat);
122 szFormat += 2;
123 return szBuffer + wcslen(szStringFormat);
124 }
125
126 // Replace %I64u with the proper platform-dependent suffix
127 if(szFormat[1] == 'I' && szFormat[2] == '6' && szFormat[3] == '4' && szFormat[4] == 'u')
128 {
129 wcscpy(szBuffer, szUint64Format);
130 szFormat += 5;
131 return szBuffer + wcslen(szUint64Format);
132 }
133 }
134
135 // Copy the character as-is
136 *szBuffer++ = *szFormat++;
137 return szBuffer;
138}
139
140char * CopyFormatCharacter(char * szBuffer, const char *& szFormat)
141{

Callers

nothing calls this directly

Calls 1

TestStrCopyFunction · 0.85

Tested by

no test coverage detected