Lizzy v1.1.1

christophedelory.lang
Class StringUtils

java.lang.Object
  extended by christophedelory.lang.StringUtils

public final class StringUtils
extends Object

General strings manipulation.

Version:
$Revision: 92 $
Author:
Christophe Delory

Method Summary
static String normalize(String str)
          Normalizes the input string.
static String toString(int i, int nbDigits)
          Returns a string representation of the integer argument as an integer in base 10.
static String toString(long i, int nbDigits)
          Returns a string representation of the long argument as an integer in base 10.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toString

public static String toString(int i,
                              int nbDigits)
Returns a string representation of the integer argument as an integer in base 10. The result is padded if needed with '0' characters up to the specified number of digits.

Parameters:
i - an integer to be converted to a string.
nbDigits - the minimum number of digits to display in the resulting string.
Returns:
the string representation of the integer value represented by the argument in decimal (base 10).
See Also:
Integer.toString(int)

toString

public static String toString(long i,
                              int nbDigits)
Returns a string representation of the long argument as an integer in base 10. The result is padded if needed with '0' characters up to the specified number of digits.

Parameters:
i - a long to be converted to a string.
nbDigits - the minimum number of digits to display in the resulting string.
Returns:
the string representation of the long value represented by the argument in decimal (base 10).
See Also:
Long.toString(long)

normalize

public static String normalize(String str)
Normalizes the input string. That is:

Parameters:
str - a string. May be null.
See Also:
String.trim()

© 2008-2009 Christophe Delory

Copyright © 2008-2009 Christophe Delory. All Rights Reserved.