org.apache.camel.util
Class StringHelper

java.lang.Object
  extended by org.apache.camel.util.StringHelper

public final class StringHelper
extends Object

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 String removeQuotes(String s)
           
static String sanitize(String s)
          Ensures that s is friendly for a URL or file system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

sanitize

public static String sanitize(String s)
Ensures that s is friendly for a URL or file system.

Parameters:
s - String to be sanitized.
Returns:
sanitized version of s.
Throws:
NullPointerException - if s is null.

countChar

public static int countChar(String s,
                            char ch)
Counts the number of times the given char is in the string

Parameters:
s - the string
ch - the char
Returns:
number of times char is located in the string

removeQuotes

public static String removeQuotes(String s)


Apache CAMEL