public class StringTool extends Object
Constructor and Description |
---|
StringTool()
Default Constructor
|
Modifier and Type | Method and Description |
---|---|
static String |
getPlatformEncoding() |
static void |
main(String[] args)
Standalone callable Test method
|
static String |
normalizePath(String destination)
Normalizes a mixed Windows/Unix Path.
|
static String |
normalizePath(String destination,
String fileSeparator)
Normalizes a Windows or Unix Path.
|
static String |
replace(String value,
String from,
String to)
Replaces from with to in given String: value
|
static String |
replace(String value,
String from,
String to,
boolean aCaseSensitiveFlag)
Replaces from with to in given String: value
|
static boolean |
startsWith(String str,
String prefix)
True if a given string starts with the another given String
|
static boolean |
startsWithIgnoreCase(String str,
String prefix)
The same as startsWith but ignores the case.
|
static String |
stringArrayListToString(ArrayList aStringList)
Transforms a (Array)List of Strings into a printable Stringlist
|
static String |
stringArrayToSpaceSeparatedString(String[] args)
Converts an String Array to a space separated String w/o any check
|
static String |
UTF16() |
public StringTool()
public static void main(String[] args)
args
- Commandline Argspublic static String replace(String value, String from, String to)
value
- original Stringfrom
- Search Patternto
- Replace with thispublic static String replace(String value, String from, String to, boolean aCaseSensitiveFlag)
value
- original Stringfrom
- Search Patternto
- Replace with thisaCaseSensitiveFlag
- set to true be case sensitive.public static String normalizePath(String destination, String fileSeparator)
destination
- fileSeparator
- a target-system fileseparatorpublic static String normalizePath(String destination)
destination
- accepted mixed form by java.File like "C:/a/mixed\path\accepted/by\Java"public static String stringArrayToSpaceSeparatedString(String[] args)
args
- The StringArraypublic static String getPlatformEncoding()
public static String stringArrayListToString(ArrayList aStringList)
aStringList
- public static boolean startsWith(String str, String prefix)
str
- The String to search inprefix
- The string to search forpublic static boolean startsWithIgnoreCase(String str, String prefix)
str
- The String to search inprefix
- The string to search forWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses