com.noelios.restlet.util
Class StringUtils

java.lang.Object
  extended by com.noelios.restlet.util.StringUtils

public class StringUtils
extends Object

String manipulation utilities.

Author:
Jerome Louvel (contact@noelios.com)

Constructor Summary
StringUtils()
           
 
Method Summary
static String strip(String source, char delimiter)
          Strips a delimiter character from both ends of the source string.
static String strip(String source, char delimiter, boolean start, boolean end)
          Strips a delimiter character from a source string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtils

public StringUtils()
Method Detail

strip

public static String strip(String source,
                           char delimiter)
Strips a delimiter character from both ends of the source string.

Parameters:
source - The source string to strip.
delimiter - The character to remove.
Returns:
The stripped string.

strip

public static String strip(String source,
                           char delimiter,
                           boolean start,
                           boolean end)
Strips a delimiter character from a source string.

Parameters:
source - The source string to strip.
delimiter - The character to remove.
start - Indicates if start of source should be stripped.
end - Indicates if end of source should be stripped.
Returns:
The stripped source string.


Copyright © 2005-2007 Noelios Consulting.