MCPcopy Create free account
hub / github.com/amazon-ion/ion-java / print_digits

Method print_digits

src/main/java/com/amazon/ion/Timestamp.java:2308–2325  ·  view source on GitHub ↗
(Appendable out, int value, int length)

Source from the content-addressed store, hash-verified

2306 }
2307 }
2308 private static void print_digits(Appendable out, int value, int length)
2309 throws IOException
2310 {
2311 char temp[] = new char[length];
2312 while (length > 0) {
2313 length--;
2314 int next = value / 10;
2315 temp[length] = (char)('0' + (value - next*10));
2316 value = next;
2317 }
2318 while (length > 0) {
2319 length--;
2320 temp[length] = '0';
2321 }
2322 for (char c : temp) {
2323 out.append(c);
2324 }
2325 }
2326 private static void print_fractional_digits(Appendable out, BigDecimal value)
2327 throws IOException
2328 {

Callers 1

printMethod · 0.95

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected