List of usage examples for java.lang String format
public static String format(String format, Object... args)
From source file:Main.java
public static String ByteToHex(byte b) { return String.format("%02X", b); }
From source file:Main.java
public static String byteToHex(byte b) { return String.format("%02x", b); }
From source file:Main.java
public static String IntTo2Hex(int val) { return String.format("%02X", val); }
From source file:Main.java
public static String addHttp(String str) { return String.format("http://%1$s", str); }
From source file:Main.java
public static String precentFormat(float x) { return String.format(":%.02f", x) + "%"; }
From source file:Main.java
public static String intTo2Dec(int number) { return String.format("%02d", number); }
From source file:Main.java
public static String byteToHexString(byte b) { return String.format("%02X", b); }
From source file:Main.java
private static String formateNumber(int time) { return String.format("%02d", time); }
From source file:Main.java
public static String keep2Point(double number) { return String.format("%.2f", number); }
From source file:Main.java
public static String padRight(String s, int n) { return String.format("%1$-" + n + "s", s); }