Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.common.utils
Class StringUtils

java.lang.Object
  extended by org.nuxeo.common.utils.StringUtils

public final class StringUtils
extends Object

Utils for String manipulations.

Author:
Anahide Tchertchian, Bogdan Stefanescu

Method Summary
static String expandVars(String expression, Map<?,?> properties)
          Expands any variable found in the given expression with the values in the given map.
static String join(List<String> list)
           
static String join(List<String> list, char separator)
           
static String join(List<String> list, String separator)
          Joins strings from a List with an optional separator.
static String join(Object[] array)
          Improved versions of join method from org.apache.commons.lang.StringUtils.
static String join(Object[] array, char separator)
           
static String join(Object[] array, String separator)
          Improved versions of join method from org.apache.commons.lang.StringUtils.
static String[] split(String str, char delimiter, boolean trim)
           
static String toAscii(String s)
          Replaces accented characters from a non-null String by their ascii equivalent.
static String toHex(String string)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toAscii

public static String toAscii(String s)
Replaces accented characters from a non-null String by their ascii equivalent.


join

public static String join(Object[] array)
Improved versions of join method from org.apache.commons.lang.StringUtils.


join

public static String join(Object[] array,
                          String separator)
Improved versions of join method from org.apache.commons.lang.StringUtils.


join

public static String join(Object[] array,
                          char separator)

join

public static String join(List<String> list,
                          String separator)
Joins strings from a List with an optional separator.

Parameters:
list - the list.
separator - the separator.
Returns:
the joined string.

join

public static String join(List<String> list)

join

public static String join(List<String> list,
                          char separator)

split

public static String[] split(String str,
                             char delimiter,
                             boolean trim)

toHex

public static String toHex(String string)

expandVars

public static String expandVars(String expression,
                                Map<?,?> properties)
Expands any variable found in the given expression with the values in the given map.

The variable format is ${property_key}.

Parameters:
expression - the expression to expand
properties - a map containing variables

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.