MCPcopy Create free account
hub / github.com/FastLED/FastLED / utoa64

Function utoa64

src/fl/stl/charconv.cpp.hpp:162–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162int utoa64(u64 value, char *sp, int radix) {
163 char tmp[32]; // larger buffer for 64-bit values
164 char *tp = tmp;
165 int i;
166 u64 v = value;
167
168 while (v || tp == tmp) {
169 i = v % radix;
170 v = radix ? v / radix : 0;
171 if (i < 10)
172 *tp++ = i + '0';
173 else
174 *tp++ = i + 'a' - 10;
175 }
176
177 int len = tp - tmp;
178
179 while (tp > tmp)
180 *sp++ = *--tp;
181
182 *sp = '\0'; // Null-terminate the string
183 return len;
184}
185
186void ftoa(float value, char *buffer, int precision) {
187 // Forward to printf_detail for now - implementation in str.cpp will be updated

Callers 7

append_u64_decimalFunction · 0.85
ieee754_format_decimalFunction · 0.85
writeMethod · 0.85
appendFormattedMethod · 0.85
printMethod · 0.85
printlnMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected