public final class StringUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
join(java.lang.StringBuilder buf,
java.lang.String addAtBeginning,
java.lang.String sep,
java.lang.String addAtEnd,
java.lang.Iterable<?> iterable)
A replacement for Java 8's String.join().
|
static java.lang.String |
join(java.lang.String sep,
java.lang.Iterable<?> iterable)
A replacement for Java 8's String.join().
|
static java.lang.String |
join(java.lang.String sep,
java.lang.Object... items)
A replacement for Java 8's String.join().
|
static java.lang.String |
readString(byte[] arr,
int startOffset,
int numBytes,
boolean replaceSlashWithDot,
boolean stripLSemicolon)
Reads the "modified UTF8" format defined in the Java classfile spec, optionally replacing '/' with '
|
public static java.lang.String readString(byte[] arr,
int startOffset,
int numBytes,
boolean replaceSlashWithDot,
boolean stripLSemicolon)
throws java.lang.IllegalArgumentException
arr - the array to read the string fromstartOffset - The start offset of the string within the array.numBytes - The number of bytes of the UTF8 encoding of the string.replaceSlashWithDot - If true, replace '/' with '.'.stripLSemicolon - If true, string final ';' character.java.lang.IllegalArgumentException - If string could not be parsed.public static void join(java.lang.StringBuilder buf,
java.lang.String addAtBeginning,
java.lang.String sep,
java.lang.String addAtEnd,
java.lang.Iterable<?> iterable)
buf - The buffer to append to.addAtBeginning - The token to add at the beginning of the string.sep - The separator string.addAtEnd - The token to add at the end of the string.iterable - The Iterable to join.public static java.lang.String join(java.lang.String sep,
java.lang.Iterable<?> iterable)
sep - The separator string.iterable - The Iterable to join.public static java.lang.String join(java.lang.String sep,
java.lang.Object... items)
sep - The separator string.items - The items to join.