| java.lang.Object com.izforge.izpack.util.StringTool
StringTool | public class StringTool (Code) | | A extended Java Implementation of Pythons string.replace()
author: marc.eppelmann@gmx.de |
StringTool | public StringTool()(Code) | | Default Constructor
|
getPlatformEncoding | public static String getPlatformEncoding()(Code) | | |
main | public static void main(String[] args)(Code) | | Standalone callable Test method
Parameters: args - Commandline Args |
normalizePath | public static String normalizePath(String destination, String fileSeparator)(Code) | | Normalizes a Windows or Unix Path.
Reason: Javas File accepts / or \ for Pathes. Batches or ShellScripts does it not!
TODO: implement support for MAC < MacOSX
Parameters: destination - Parameters: fileSeparator - a target-system fileseparator the normalized path |
normalizePath | public static String normalizePath(String destination)(Code) | | Normalizes a mixed Windows/Unix Path. Does Only work for Windows or Unix Pathes Reason:
Java.File accepts / or \ for Pathes. Batches or ShellScripts does it not!
Parameters: destination - accepted mixed form by java.File like "C:/a/mixed\path\accepted/by\Java" the normalized Path |
replace | public static String replace(String value, String from, String to)(Code) | | Replaces from with to in given String: value
Parameters: value - original String Parameters: from - Search Pattern Parameters: to - Replace with this the replaced String |
replace | public static String replace(String value, String from, String to, boolean aCaseSensitiveFlag)(Code) | | Replaces from with to in given String: value
Parameters: value - original String Parameters: from - Search Pattern Parameters: to - Replace with this Parameters: aCaseSensitiveFlag - set to true be case sensitive. the replaced String |
startsWith | public static boolean startsWith(String str, String prefix)(Code) | | True if a given string starts with the another given String
Parameters: str - The String to search in Parameters: prefix - The string to search for True if str starts with prefix |
startsWithIgnoreCase | public static boolean startsWithIgnoreCase(String str, String prefix)(Code) | | The same as startsWith but ignores the case.
Parameters: str - The String to search in Parameters: prefix - The string to search for rue if str starts with prefix |
stringArrayListToString | public static String stringArrayListToString(ArrayList aStringList)(Code) | | Transforms a (Array)List of Strings into a line.separator="\n" separated Stringlist.
Parameters: aStringList - a printable list |
stringArrayListToString | public static String stringArrayListToString(ArrayList aStringList, String aLineSeparator)(Code) | | Transforms a (Array)List of Strings into an aLineSeparator separated Stringlist.
Parameters: aStringList - a printable list |
stringArrayToSpaceSeparatedString | public static String stringArrayToSpaceSeparatedString(String[] args)(Code) | | Converts an String Array to a space separated String w/o any check
Parameters: args - The StringArray the space separated result. |
|
|