MCPcopy Create free account
hub / github.com/Card-Forge/forge / getNumeral

Method getNumeral

forge-core/src/main/java/forge/util/Lang.java:201–213  ·  view source on GitHub ↗
(int n)

Source from the content-addressed store, hash-verified

199 "eighty", "ninety" };
200
201 public static String getNumeral(int n) {
202 final String prefix = n < 0 ? "minus " : "";
203 n = Math.abs(n);
204 if (n >= 0 && n < 20) {
205 return prefix + numbers0[n];
206 }
207 if (n < 100) {
208 final int n1 = n % 10;
209 final String ones = n1 == 0 ? "" : numbers0[n1];
210 return prefix + numbers20[(n / 10) - 2] + " " + ones;
211 }
212 return Integer.toString(n);
213 }
214
215 public String getNickName(final String name) {
216 if (name.contains(",")) {

Callers 15

toStringMethod · 0.95
parseMethod · 0.95
tokenizeStringMethod · 0.95
resolveMethod · 0.95
getStackDescriptionMethod · 0.95
getStackDescriptionMethod · 0.95
getStackDescriptionMethod · 0.95
getStackDescriptionMethod · 0.95
getStackDescriptionMethod · 0.95
getStackDescriptionMethod · 0.95

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected