MCPcopy Create free account
hub / github.com/apache/impala / ZeroPad

Function ZeroPad

be/src/runtime/datetime-simple-date-format-parser.h:187–196  ·  view source on GitHub ↗

Helper function for formatting small numbers with leading zeros This is used inline with data and timestamp formatting functions

Source from the content-addressed store, hash-verified

185/// Helper function for formatting small numbers with leading zeros
186/// This is used inline with data and timestamp formatting functions
187inline 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

Callers 2

FormatDefaultMethod · 0.85
FormatDefaultMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected