public final class CoreStringUtils extends Object
| Constructor and Description |
|---|
CoreStringUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
alignLeft(String s,
int width)
copied from StringUtils (in order to remove dependency)
|
static String |
alignRight(String s,
int width) |
static String |
chrToStr(char[] s) |
static StringBuilder |
clear(StringBuilder c)
copied from StringUtils (in order to remove dependency)
|
static String |
coalesce(String a,
String b) |
static boolean |
containsTopWord(String word,
String line) |
static boolean |
containsVars(String value) |
static String |
dblQuote(String text) |
static String |
dblQuote(String text,
boolean compact,
String entrySeparators) |
static String |
enforceDoubleQuote(String s) |
static String |
enforceDoubleQuote(String s,
net.thevpc.nuts.NutsSession session) |
static String |
escapeQuoteStrings(String s) |
static String |
escapeReplacementStrings(String s) |
static net.thevpc.nuts.NutsMessage |
exceptionToMessage(Throwable ex) |
static net.thevpc.nuts.NutsMessage |
exceptionToMessage(Throwable ex,
boolean inner) |
static String |
exceptionToString(Throwable ex)
copied from StringUtils (in order to remove dependency)
|
static String |
exceptionToString(Throwable ex,
boolean inner) |
static String |
fillString(char x,
int width)
copied from StringUtils (in order to remove dependency)
|
static void |
fillString(char x,
int width,
net.thevpc.nuts.NutsTextBuilder sb) |
static void |
fillString(char x,
int width,
StringBuilder sb) |
static String |
fillString(String x,
int width) |
static void |
fillString(String x,
int width,
net.thevpc.nuts.NutsTextBuilder sb) |
static void |
fillString(String x,
int width,
StringBuilder sb) |
static int |
firstIndexOf(String string,
char[] chars) |
static String |
indexToString(int x) |
static String |
joinAndTrimToNull(String[] args) |
static String[] |
parseAndTrimToDistinctArray(String s) |
static String |
prefixLines(String str,
String prefix,
String nl) |
static String |
prefixLinesOsNL(String str,
String prefix) |
static String |
prefixLinesPortableNL(String str,
String prefix) |
static String |
simpleQuote(String text) |
static String |
simpleQuote(String text,
boolean compact,
String escapedChars) |
static List<String> |
splitOn(String line,
char sep) |
static List<String> |
splitOnNewlines(String line) |
static String |
stringValue(Object o) |
static char[] |
strToChr(String s) |
public static String simpleQuote(String text, boolean compact, String escapedChars)
text - textcompact - if true, quotes will not be used unless necessaryescapedChars - escapedChars, can be nullpublic static String dblQuote(String text, boolean compact, String entrySeparators)
text - textcompact - if true, quotes will not be used unless necessaryentrySeparators - entrySeparatorspublic static boolean containsVars(String value)
public static char[] strToChr(String s)
public static String chrToStr(char[] s)
public static String enforceDoubleQuote(String s, net.thevpc.nuts.NutsSession session)
public static StringBuilder clear(StringBuilder c)
c - builderpublic static String exceptionToString(Throwable ex)
ex - expublic static int firstIndexOf(String string, char[] chars)
public static net.thevpc.nuts.NutsMessage exceptionToMessage(Throwable ex)
public static net.thevpc.nuts.NutsMessage exceptionToMessage(Throwable ex, boolean inner)
public static String fillString(char x, int width)
x - xwidth - widthpublic static void fillString(char x,
int width,
StringBuilder sb)
public static void fillString(char x,
int width,
net.thevpc.nuts.NutsTextBuilder sb)
public static void fillString(String x, int width, StringBuilder sb)
public static void fillString(String x, int width, net.thevpc.nuts.NutsTextBuilder sb)
public static String alignLeft(String s, int width)
s - stringwidth - widthpublic static String indexToString(int x)
Copyright © 2022 vpc open source initiative. All rights reserved.