com.stevesoft.pat
Class CaseMgr

java.lang.Object
  |
  +--com.stevesoft.pat.CaseMgr

public final class CaseMgr
extends java.lang.Object

Encapsulates the Unicode definitions of Upper, Lower, and Title case as defined by unicode.org.

The performance of the methods found in String and Character is better, but these methods work both in java 1.0 and 1.1. If it is desirable, either to gain a slight performance increase or to accomodate application specific modifications to the definitions of upper, lower, and title case then it should be a straightforward task to substitute your own methods for these.


Constructor Summary
CaseMgr()
           
 
Method Summary
static boolean regionMatches(java.lang.String s1, boolean ign, int i1, java.lang.String s2, int i2, int i3)
          Duplicates the regionMatches routine of String -- but makes use of the definitions of upper, lower, and title case in this class when ignoreCase is set.
static boolean regionMatches(java.lang.String s1, boolean ign, int i1, StringLike s2, int i2, int i3)
          Duplicates the regionMatches routine of String -- but makes use of the definitions of upper, lower, and title case in this class when ignoreCase is set.
static boolean regionMatches(StringLike s1, boolean ign, int i1, java.lang.String s2, int i2, int i3)
          Duplicates the regionMatches routine of String -- but makes use of the definitions of upper, lower, and title case in this class when ignoreCase is set.
static boolean regionMatches(StringLike s1, boolean ign, int i1, StringLike s2, int i2, int i3)
          Duplicates the regionMatches routine of String -- but makes use of the definitions of upper, lower, and title case in this class when ignoreCase is set.
static char toLowerCase(char c)
          Convert a character to lower case.
static java.lang.String toLowerCase(java.lang.String s)
          Convert a String to lower case.
static char toTitleCase(char c)
          Convert a character to title case.
static java.lang.String toTitleCase(java.lang.String s)
          Convert a String to title case.
static char toUpperCase(char c)
          Convert a character to upper case .
static java.lang.String toUpperCase(java.lang.String s)
          Convert a String to upper case.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CaseMgr

public CaseMgr()
Method Detail

toUpperCase

public static char toUpperCase(char c)
Convert a character to upper case .

toLowerCase

public static char toLowerCase(char c)
Convert a character to lower case.

toTitleCase

public static java.lang.String toTitleCase(java.lang.String s)
Convert a String to title case.

toUpperCase

public static java.lang.String toUpperCase(java.lang.String s)
Convert a String to upper case.

toLowerCase

public static java.lang.String toLowerCase(java.lang.String s)
Convert a String to lower case.

toTitleCase

public static char toTitleCase(char c)
Convert a character to title case.

regionMatches

public static boolean regionMatches(StringLike s1,
                                    boolean ign,
                                    int i1,
                                    StringLike s2,
                                    int i2,
                                    int i3)
Duplicates the regionMatches routine of String -- but makes use of the definitions of upper, lower, and title case in this class when ignoreCase is set.

regionMatches

public static boolean regionMatches(java.lang.String s1,
                                    boolean ign,
                                    int i1,
                                    StringLike s2,
                                    int i2,
                                    int i3)
Duplicates the regionMatches routine of String -- but makes use of the definitions of upper, lower, and title case in this class when ignoreCase is set.

regionMatches

public static boolean regionMatches(StringLike s1,
                                    boolean ign,
                                    int i1,
                                    java.lang.String s2,
                                    int i2,
                                    int i3)
Duplicates the regionMatches routine of String -- but makes use of the definitions of upper, lower, and title case in this class when ignoreCase is set.

regionMatches

public static boolean regionMatches(java.lang.String s1,
                                    boolean ign,
                                    int i1,
                                    java.lang.String s2,
                                    int i2,
                                    int i3)
Duplicates the regionMatches routine of String -- but makes use of the definitions of upper, lower, and title case in this class when ignoreCase is set.