@return the number of characters required to represent the value with the specified radix
(int value, int radix)
| 2180 | |
| 2181 | /** @return the number of characters required to represent the value with the specified radix */ |
| 2182 | static public int numChars (int value, int radix) { |
| 2183 | int result = (value < 0) ? 2 : 1; |
| 2184 | while ((value /= radix) != 0) |
| 2185 | ++result; |
| 2186 | return result; |
| 2187 | } |
| 2188 | |
| 2189 | /** @return the number of characters required to represent the value with the specified radix */ |
| 2190 | static public int numChars (long value, int radix) { |