Helper function for formatting small numbers with leading zeros This is used inline with data and timestamp formatting functions
| 185 | /// Helper function for formatting small numbers with leading zeros |
| 186 | /// This is used inline with data and timestamp formatting functions |
| 187 | inline void ZeroPad(char* const dst, uint32 val, const uint32 digits) { |
| 188 | char* p = dst + digits; |
| 189 | while(val) { |
| 190 | *--p = '0' + (val % 10); |
| 191 | val /= 10; |
| 192 | } |
| 193 | while(p != dst) { |
| 194 | *--p = '0'; |
| 195 | } |
| 196 | } |
| 197 | |
| 198 | } |
| 199 |
no outgoing calls
no test coverage detected