|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.util.StringHelper
public final class StringHelper
Helper methods for working with Strings.
Method Summary | |
---|---|
static int |
countChar(java.lang.String s,
char ch)
Counts the number of times the given char is in the string |
static boolean |
hasStartToken(java.lang.String expression,
java.lang.String language)
Does the expression have the language start token? |
static boolean |
hasUpperCase(java.lang.String text)
Determines if the string has at least one letter in upper case |
static java.lang.String |
removeLeadingAndEndingQuotes(java.lang.String s)
|
static java.lang.String |
removeQuotes(java.lang.String s)
|
static java.lang.String |
sanitize(java.lang.String s)
Ensures that s is friendly for a URL or file system. |
static java.lang.String |
xmlEncode(java.lang.String text)
Encodes the text into safe XML by replacing < > and & with XML tokens |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String sanitize(java.lang.String s)
s
is friendly for a URL or file system.
s
- String to be sanitized.
s
.
java.lang.NullPointerException
- if s
is null
.public static int countChar(java.lang.String s, char ch)
s
- the stringch
- the char
public static java.lang.String removeQuotes(java.lang.String s)
public static java.lang.String removeLeadingAndEndingQuotes(java.lang.String s)
public static java.lang.String xmlEncode(java.lang.String text)
text
- the text
public static boolean hasUpperCase(java.lang.String text)
text
- the text
public static boolean hasStartToken(java.lang.String expression, java.lang.String language)
expression
- the expressionlanguage
- the name of the language, such as simple
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |