|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crosswire.common.util.Language.CanonicalUtils
private static final class Language.CanonicalUtils
Converts substrings to the canonical representation for language code, script and country.
| Constructor Summary | |
|---|---|
private |
Language.CanonicalUtils()
Utility class. |
| Method Summary | |
|---|---|
static String |
getCountry(String specification,
int start,
int end)
The iso3166 country code's canonical form is upper case. |
static String |
getLanguage(String specification,
int start,
int end)
The iso639 language code's canonical form is lower case. |
static String |
getScript(String specification,
int start,
int end)
The iso15924 script code's canonical form is title case. |
private static boolean |
isLowerASCII(char c)
Determine whether the character is one of a-z. |
private static boolean |
isUpperASCII(char c)
Determine whether the character is one of A-Z. |
private static char |
toLowerASCII(char c)
Convert a character, in in A-Z to its lower case value, otherwise leave it alone. |
private static char |
toUpperASCII(char c)
Convert a character, in in a-z to its upper case value, otherwise leave it alone. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
private Language.CanonicalUtils()
| Method Detail |
|---|
public static String getLanguage(String specification,
int start,
int end)
specification - the bcp47 specification of the languagestart - the start of the codeend - the position of the character following the code
public static String getCountry(String specification,
int start,
int end)
specification - the bcp47 specification of the languagestart - the start of the codeend - the position of the character following the code
public static String getScript(String specification,
int start,
int end)
specification - the bcp47 specification of the languagestart - the start of the codeend - the position of the character following the code
private static boolean isUpperASCII(char c)
c - the character to examine
private static boolean isLowerASCII(char c)
c - the character to examine
private static char toUpperASCII(char c)
c - the character to convert, if in a-z
private static char toLowerASCII(char c)
c - the character to convert, if in A-Z
|
Copyright ยจ 2003-2015 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||