org.richfaces.cdk.util
Class Strings

java.lang.Object
  extended by org.richfaces.cdk.util.Strings

public final class Strings
extends java.lang.Object

String manipulation utils.

Author:
asmirnov@exadel.com

Method Summary
static java.lang.String cut(java.lang.String in, int size)
          

Remove characters from string end

static java.lang.String firstToLowerCase(java.lang.String in)
          

Change case of the first character to lower, as it required by the Java Beans property and setter/getter method name conventions:

static java.lang.String firstToUpperCase(java.lang.String in)
          

Change case of the first character to upper, as it required by the Java Beans property and setter/getter method name conventions:

static boolean isEmpty(java.lang.String type)
          

Check string for null or empty value

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

cut

public static java.lang.String cut(java.lang.String in,
                                   int size)

Remove characters from string end

Parameters:
in - input string
size - number of characters to remove.
Returns:

firstToLowerCase

public static java.lang.String firstToLowerCase(java.lang.String in)

Change case of the first character to lower, as it required by the Java Beans property and setter/getter method name conventions:

"PropertyFoo" will be changed to "propertyFoo"

Parameters:
in -
Returns:
in with first character changed to lower case.

firstToUpperCase

public static java.lang.String firstToUpperCase(java.lang.String in)

Change case of the first character to upper, as it required by the Java Beans property and setter/getter method name conventions:

"propertyFoo" will be changed to "PropertyFoo"

Parameters:
in -
Returns:
in with first character changed to lower case.

isEmpty

public static boolean isEmpty(java.lang.String type)

Check string for null or empty value

Parameters:
type -
Returns:
true if type is null or zero-length string.


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.