org.robolectric.res.android.Formatter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of resources Show documentation
Show all versions of resources Show documentation
An alternative Android testing framework.
package org.robolectric.res.android;
public class Formatter {
public static StringBuilder toHex(int value, int digits) {
StringBuilder sb = new StringBuilder(digits + 2);
sb.append("0x");
String hex = Integer.toHexString(value);
for (int i = hex.length(); i < digits; i++) {
sb.append("0");
}
return sb.append(hex);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy