String value components.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static String | Returns: stringan array of Objects array)Builds a bracketed CSV list from the array |
| public static String | |
| public static String | |
| public static String | |
| public static String | |
| public static boolean | |
| public static int | Returns: trimmed sizethe string s)Returns the size of substring that does not contain any trailing spaces |
| public static int | Returns: index of first non-spacethe string s, int index to start start)Skips any spaces at or after start and returns the index of first non-space character; |
| public static String[] | |
| public static String | Returns: converted stringstring to convert source, char character to use substitute)Returns a string with non-alphanumeric chars converted to the substitute character. |
| public static String | |
| public static String | |
| public static String | Returns: Stringlong value, int int precision, int int maxSize)If necessary, adds zeros to the beginning of a value so that the total length matches the given precision, otherwise trims the right digits. |
| StringUtil | back to summary |
|---|---|
| public StringUtil() | |
| arrayToString | back to summary |
|---|---|
| public static String arrayToString(Object array) Builds a bracketed CSV list from the array | |
| getList | back to summary |
|---|---|
| public static String getList(String[] s, String separator, String quote) Builds a CSV list from the specified String[], separator string and quote string.
| |
| getList | back to summary |
|---|---|
| public static String getList(int[] s, String separator, String quote) Builds a CSV list from the specified int[], separator String and quote String.
| |
| getList | back to summary |
|---|---|
| public static String getList(long[] s, String separator, String quote) | |
| getList | back to summary |
|---|---|
| public static String getList(String[][] s, String separator, String quote) Builds a CSV list from the specified String[][], separator string and quote string.
| |
| isEmpty | back to summary |
|---|---|
| public static boolean isEmpty(String s) Checks if text is empty (
| |
| rightTrimSize | back to summary |
|---|---|
| public static int rightTrimSize(String s) Returns the size of substring that does not contain any trailing spaces
| |
| skipSpaces | back to summary |
|---|---|
| public static int skipSpaces(String s, int start) Skips any spaces at or after start and returns the index of first non-space character;
| |
| split | back to summary |
|---|---|
| public static String[] split(String s, String separator) Splits the string into an array, using the separator. If separator is not found in the string, the whole string is returned in the array. | |
| toLowerSubset | back to summary |
|---|---|
| public static String toLowerSubset(String source, char substitute) Returns a string with non-alphanumeric chars converted to the substitute character. A digit first character is also converted. By sqlbob@users | |
| toPaddedString | back to summary |
|---|---|
| public static String toPaddedString(String source, int length, char pad, boolean trailing) | |
| toPaddedString | back to summary |
|---|---|
| public static String toPaddedString(String source, int length, String pad, boolean trailing) | |
| toZeroPaddedString | back to summary |
|---|---|
| public static String toZeroPaddedString(long value, int precision, int maxSize) If necessary, adds zeros to the beginning of a value so that the total length matches the given precision, otherwise trims the right digits. Then if maxSize is smaller than precision, trims the right digits to maxSize. Negative values are treated as positive
| |