Modifier and Type | Field and Description |
---|---|
static char |
DEFAULT_PAD_CHAR |
Modifier and Type | Method and Description |
---|---|
static boolean |
isNullOrEmpty(String s) |
static String |
padEnd(String s,
int length)
Calls
padEnd(String, int, char) with the DEFAULT_PAD_CHAR |
static String |
padEnd(String s,
int length,
char padChar)
Adds characters to the end of the
String to make it the given
length |
static String |
padStart(String s,
int length)
Calls
padStart(String, int, char) with the
DEFAULT_PAD_CHAR |
static String |
padStart(String s,
int length,
char padChar)
Adds characters to the start of the
String to make it the given
length |
static boolean |
samePrefix(String s1,
String s2)
Checks if two filenames have the same prefix.
|
static String |
sanitize(String s)
Removes unprintable characters from the given string.
|
static String |
sanitizeDouble(String value)
Normalizes the decimal separator for the user's locale.
|
static String[] |
splitUnquoted(String s,
String separator)
Splits a string only at separators outside of quotation marks (
" ). |
static String |
stripNulls(String toStrip)
Removes null bytes from a string.
|
public static final char DEFAULT_PAD_CHAR
public static String[] splitUnquoted(String s, String separator)
"
).
Does not handle escaped quotes.public static String sanitizeDouble(String value)
public static boolean samePrefix(String s1, String s2)
public static String sanitize(String s)
public static boolean isNullOrEmpty(String s)
public static String padEnd(String s, int length)
padEnd(String, int, char)
with the DEFAULT_PAD_CHAR
public static String padEnd(String s, int length, char padChar)
String
to make it the given
lengths
- the original stringlength
- the length of the string with paddingpadChar
- the character added to the endString
. Null if s is null, s if no padding
is not necessarypublic static String padStart(String s, int length)
padStart(String, int, char)
with the
DEFAULT_PAD_CHAR
public static String padStart(String s, int length, char padChar)
String
to make it the given
lengths
- the original stringlength
- the length of the string with paddingpadChar
- the character added to the startString
. Null if s is null, s if no padding
is not necessaryCopyright © 2015–2022 SciJava. All rights reserved.