MCPcopy Create free account
hub / github.com/derceg/explorerplusplus / PrintCommaLargeNum

Function PrintCommaLargeNum

Explorer++/Helper/StringHelper.cpp:128–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128TCHAR *PrintCommaLargeNum(LARGE_INTEGER lPrint)
129{
130 static TCHAR szBuffer[14];
131 TCHAR *p = &szBuffer[SIZEOF_ARRAY(szBuffer) - 1];
132 static TCHAR chComma = ',';
133 auto nTemp = (unsigned long long)(lPrint.LowPart + (lPrint.HighPart * pow(2.0, 32.0)));
134 int i = 0;
135
136 if(nTemp == 0)
137 {
138 StringCchPrintf(szBuffer, SIZEOF_ARRAY(szBuffer), _T("%d"), 0);
139 return szBuffer;
140 }
141
142 *p = (TCHAR)'\0';
143
144 while(nTemp != 0)
145 {
146 if (i % 3 == 0 && i != 0)
147 {
148 *--p = chComma;
149 }
150
151 *--p = '0' + (TCHAR) (nTemp % 10);
152
153 nTemp /= 10;
154
155 i++;
156 }
157
158 return p;
159}
160
161BOOL CheckWildcardMatch(const TCHAR *szWildcard, const TCHAR *szString, BOOL bCaseSensitive)
162{

Callers 1

PrintCommaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected