ccc.commons
Class Strings

java.lang.Object
  extended by ccc.commons.Strings

public final class Strings
extends java.lang.Object

Helper methods for strings.

Author:
Civic Computing Ltd.

Method Summary
static java.lang.String nvl(java.lang.String original, java.lang.String replacement)
          NVL implementation.
static java.lang.String removeTrailing(char c, java.lang.String foo)
          Remove a trailing character from a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

nvl

public static java.lang.String nvl(java.lang.String original,
                                   java.lang.String replacement)
NVL implementation.

Parameters:
original - The original string.
replacement - The potential replacement.
Returns:
If original is null return the replacement, otherwise return the original.

removeTrailing

public static java.lang.String removeTrailing(char c,
                                              java.lang.String foo)
Remove a trailing character from a string.

Parameters:
c - The character to remove.
foo - The string from which to remove.
Returns:
The string minus the char.


Copyright © 2010. All Rights Reserved.