MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / intToHexString

Method intToHexString

vm/JavaAPI/src/java/lang/Integer.java:226–237  ·  view source on GitHub ↗
(int i, int minWidth)

Source from the content-addressed store, hash-verified

224 }
225
226 public static String intToHexString(int i, int minWidth) {
227 int bufLen = 8; // Max number of hex digits in an int
228 char[] buf = new char[bufLen];
229 int cursor = bufLen;
230
231 char[] digits = DIGITS;
232 do {
233 buf[--cursor] = digits[i & 0xf];
234 } while ((i >>>= 4) != 0 || (bufLen - cursor < minWidth));
235
236 return new String(buf, cursor, bufLen - cursor);
237 }
238
239 public static String intToOctalString(int i) {
240 int bufLen = 11; // Max number of octal digits in an int

Callers 1

toHexStringMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected