public final class BinaryStringUtils extends Object
Modifier and Type | Field and Description |
---|---|
static char |
SEPARATOR |
Modifier and Type | Method and Description |
---|---|
static String |
fromPrettyString(String prettyBinaryString)
Reverse operation of
prettyPrint(String) . |
static String |
fromPrettyString(String prettyBinaryString,
char separator)
Reverse operation of
prettyPrint(String, char) . |
static String |
prettyPrint(String binaryString)
Returns
binaryString zero-padded separated by 95 in groups of 4. |
static String |
prettyPrint(String binaryString,
char separator)
Returns
binaryString zero-padded separated by seaparator in groups of 4. |
static String |
zeroPadString(String binaryString)
Same as
zeroPadString(String, int) , but determines minLength automatically. |
static String |
zeroPadString(String binaryString,
int minLength) |
public static final char SEPARATOR
public static final String prettyPrint(String binaryString)
binaryString
zero-padded separated by 95 in groups of 4.public static final String prettyPrint(String binaryString, char separator)
binaryString
zero-padded separated by seaparator
in groups of 4.public static final String fromPrettyString(String prettyBinaryString)
prettyPrint(String)
.public static final String fromPrettyString(String prettyBinaryString, char separator)
prettyPrint(String, char)
.public static final String zeroPadString(String binaryString, int minLength)
Strings#padStart(String, int, char)}. Char is set to the value {@code 0}.
public static final String zeroPadString(String binaryString)
zeroPadString(String, int)
, but determines minLength
automatically.Copyright © 2012–2015 Christian Sterzl. All rights reserved.