jsyntaxpane.util
Class StringUtils

java.lang.Object
  extended by jsyntaxpane.util.StringUtils

public class StringUtils
extends java.lang.Object

Don't we all need one of those?

Author:
Ayman Al-Sairafi

Constructor Summary
StringUtils()
           
 
Method Summary
static boolean camelCaseMatch(java.lang.String word, java.lang.String abbr)
          Perfrom a String startsWith match with support for CamelCase.
 
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

camelCaseMatch

public static boolean camelCaseMatch(java.lang.String word,
                                     java.lang.String abbr)
Perfrom a String startsWith match with support for CamelCase.

Parameters:
word - full word
abbr - abbriviated word
Returns:
true if the word startsWith abbr, or if any uppercase char in abbr matches the next uppercase char in word FIXME: not so effecient as it creates a StringBuilder, but works FIXME: add Comparator<String, String>