public final class StringTypesUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
assertWhitespaceFree(java.lang.CharSequence value,
java.lang.String valueDescription) |
static void |
assertWhitespaceFree(java.lang.CharSequence value,
java.lang.String formatString,
java.lang.Object... formatObjects)
Assert that given string is free of whitespaces as determined by
Character.isWhitespace(char). |
static char |
lastChar(java.lang.StringBuilder sb) |
static void |
replaceEnd(java.lang.StringBuilder sb,
int reverseOffsetFromEnd,
java.lang.CharSequence string)
Used to replace the end of the current buffer, starting at reverseOffsetFromEnd.
|
static java.lang.CharSequence |
right(java.lang.StringBuilder sb,
int len)
returns the
CharSequence from the right but at most the whole buffer no matter how large len is. |
static java.lang.StringBuilder |
setLengthRelative(java.lang.StringBuilder sb,
int len)
Add or subtract the len to the current length.
|
public static java.lang.StringBuilder setLengthRelative(java.lang.StringBuilder sb,
int len)
sb - the sblen - the length postive values will increase the buffer, negative will decrease. Latter case will not cause an
exception if by this the length will be < 0 but will set it to 0.public static java.lang.CharSequence right(java.lang.StringBuilder sb,
int len)
CharSequence from the right but at most the whole buffer no matter how large len is.sb - the sblen - the lenpublic static char lastChar(java.lang.StringBuilder sb)
mainQuery - public static void replaceEnd(java.lang.StringBuilder sb,
int reverseOffsetFromEnd,
java.lang.CharSequence string)
sb - the sbreverseOffsetFromEnd - will be subtracted from length of sb, negative numbers will result in \0 being inserted. Must not be >1
sb.lengthstring - the stringpublic static void assertWhitespaceFree(java.lang.CharSequence value,
java.lang.String valueDescription)
valueDescription - literalFilter - public static void assertWhitespaceFree(java.lang.CharSequence value,
java.lang.String formatString,
java.lang.Object... formatObjects)
Character.isWhitespace(char).value - the valueformatString - the format stringformatObjects - the format objects