|
||||||||||
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(String s,
char ch)
Counts the number of times the given char is in the string |
static boolean |
hasStartToken(String expression,
String language)
Does the expression have the language start token? |
static boolean |
hasUpperCase(String text)
Determines if the string has at least one letter in upper case |
static String |
removeLeadingAndEndingQuotes(String s)
|
static String |
removeQuotes(String s)
|
static String |
sanitize(String s)
Ensures that s is friendly for a URL or file system. |
static String |
xmlEncode(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 String sanitize(String s)
s
is friendly for a URL or file system.
s
- String to be sanitized.
s
.
NullPointerException
- if s
is null
.public static int countChar(String s, char ch)
s
- the stringch
- the char
public static String removeQuotes(String s)
public static String removeLeadingAndEndingQuotes(String s)
public static String xmlEncode(String text)
text
- the text
public static boolean hasUpperCase(String text)
text
- the text
public static boolean hasStartToken(String expression, 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 |