MCPcopy Index your code
hub / github.com/GregTech6/gregtech6 / makeString

Method makeString

src/main/java/gregapi/util/UT.java:1296–1313  ·  view source on GitHub ↗

Converts a Number to a String with Underscores as Decimal Separators. Ignores Numbers with 4 Digits or less.

(long aNumber)

Source from the content-addressed store, hash-verified

1294
1295 /** Converts a Number to a String with Underscores as Decimal Separators. Ignores Numbers with 4 Digits or less. */
1296 public static String makeString(long aNumber) {
1297 if (aNumber > -10000 && aNumber < 10000) return Long.toString(aNumber);
1298 StringBuilder rString = new StringBuilder();
1299 if (aNumber < 0) {
1300 aNumber *= -1;
1301 rString.append('-');
1302 }
1303 boolean temp = T;
1304 for (long i = 1000000000000000000L; i > 0; i /= 10) {
1305 long tDigit = (aNumber / i) % 10;
1306 if ( temp && tDigit != 0) temp = F;
1307 if (!temp) {
1308 rString.append(tDigit);
1309 if (i != 1) for (long j = i; j > 0; j /= 1000) if (j == 1) rString.append('_');
1310 }
1311 }
1312 return rString.toString();
1313 }
1314
1315 @SafeVarargs
1316 public static <E> boolean contains(E aTarget, E... aArray) {

Callers

nothing calls this directly

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected