org.apache.ivy.util
Class StringUtils

java.lang.Object
  extended by org.apache.ivy.util.StringUtils

public class StringUtils
extends java.lang.Object

Convenient class used only for uncapitalization Usually use commons lang but here we do not want to have such a dependency for only one feature

Author:
X. Hanin

Constructor Summary
StringUtils()
           
 
Method Summary
static java.lang.String decrypt(java.lang.String str)
          Decrypts a string encrypted with encrypt.
static java.lang.String encrypt(java.lang.String str)
          Encrypt the given string in a way which anybody having access to this method algorithm can easily decrypt.
static java.lang.String join(java.lang.Object[] objs, java.lang.String sep)
          Joins the given object array in one string, each separated by the given separator.
static java.lang.String uncapitalize(java.lang.String 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

uncapitalize

public static java.lang.String uncapitalize(java.lang.String string)

join

public static java.lang.String join(java.lang.Object[] objs,
                                    java.lang.String sep)
Joins the given object array in one string, each separated by the given separator. Example: join(new String[] {"one", "two", "three"}, ", ") -> "one, two, three"

Parameters:
objs -
sep -
Returns:

encrypt

public static final java.lang.String encrypt(java.lang.String str)
Encrypt the given string in a way which anybody having access to this method algorithm can easily decrypt. This is useful only to avoid clear string storage in a file for example, but shouldn't be considered as a real mean of security. This only works with simple characters (char < 256).

Parameters:
str - the string to encrypt
Returns:
the encrypted version of the string

decrypt

public static final java.lang.String decrypt(java.lang.String str)
Decrypts a string encrypted with encrypt.

Parameters:
str - the encrypted string to decrypt
Returns: