com.endeca.portlet.util
Class StringUtil

java.lang.Object
  extended by com.endeca.portlet.util.StringUtil

public class StringUtil
extends java.lang.Object

String Utility functions


Constructor Summary
StringUtil()
           
 
Method Summary
static int codePointCount(java.lang.String str)
          Returns the number of Unicode code points in the passed string.
static java.lang.String codePointSubString(java.lang.String str, int startIndex, int codePointOffset)
          Returns the substring of a string in terms of code points and not 'char' values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtil

public StringUtil()
Method Detail

codePointCount

public static int codePointCount(java.lang.String str)
Returns the number of Unicode code points in the passed string.

Parameters:
str -
Returns:

codePointSubString

public static java.lang.String codePointSubString(java.lang.String str,
                                                  int startIndex,
                                                  int codePointOffset)
Returns the substring of a string in terms of code points and not 'char' values. This takes into consideration surrogate characters which are considered as two different 'char's in substring method of String.

Parameters:
str - - The original string
startIndex - - The starting index
codePointOffset - - The offset in code points
Returns: