|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.exec.util.StringUtils
public class StringUtils
Supplement of commons-lang, the stringSubstitution() was in a simpler implementation available in an older commons-lang implementation. This class is not part of the public API and could change without warning.
| Constructor Summary | |
|---|---|
StringUtils()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
fixFileSeparatorChar(java.lang.String arg)
Fixes the file separator char for the target platform using the following replacement. |
static boolean |
isQuoted(java.lang.String argument)
Determines if this is a quoted argument - either single or double quoted. |
static java.lang.String |
quoteArgument(java.lang.String argument)
Put quotes around the given String if necessary. |
static java.lang.String[] |
split(java.lang.String input,
java.lang.String splitChar)
Split a string into an array of strings based on a separator. |
static java.lang.StringBuffer |
stringSubstitution(java.lang.String argStr,
java.util.Map vars,
boolean isLenient)
Perform a series of substitutions. |
static java.lang.String |
toString(java.lang.String[] strings,
java.lang.String separator)
Concatenates an array of string using a separator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringUtils()
| Method Detail |
|---|
public static java.lang.StringBuffer stringSubstitution(java.lang.String argStr,
java.util.Map vars,
boolean isLenient)
argStr - the argument string to be processedvars - name/value pairs used for substitutionisLenient - ignore a key not found in vars or throw a RuntimeException?
public static java.lang.String[] split(java.lang.String input,
java.lang.String splitChar)
input - what to splitsplitChar - what to split on
public static java.lang.String fixFileSeparatorChar(java.lang.String arg)
arg - the argument to fix
public static java.lang.String toString(java.lang.String[] strings,
java.lang.String separator)
strings - the strings to concatenateseparator - the separator between two strings
public static java.lang.String quoteArgument(java.lang.String argument)
If the argument doesn't include spaces or quotes, return it as is. If it contains double quotes, use single quotes - else surround the argument by double quotes.
argument - the argument to be quoted
java.lang.IllegalArgumentException - If argument contains both types of quotespublic static boolean isQuoted(java.lang.String argument)
argument - the argument to check
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||