Package com.ibm.icu.impl
Class UCharacterUtility
- java.lang.Object
-
- com.ibm.icu.impl.UCharacterUtility
-
public final class UCharacterUtility extends java.lang.Object
Internal character utility class for simple data type conversion and String parsing functions. Does not have an analog in the JDK.- Since:
- sep2900
-
-
Field Summary
Fields Modifier and Type Field Description private static int
NON_CHARACTER_MAX_3_1_
New non character range in Unicode 3.1private static int
NON_CHARACTER_MIN_3_1_
New minimum non character in Unicode 3.1private static int
NON_CHARACTER_SUFFIX_MIN_3_0_
Minimum suffix value that indicates if a character is non character.
-
Constructor Summary
Constructors Modifier Constructor Description private
UCharacterUtility()
private constructor to avoid initialization
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static int
compareNullTermByteSubString(java.lang.String str, byte[] array, int strindex, int aindex)
Compares a null terminated substring from an array of bytes.(package private) static int
getNullTermByteSubString(java.lang.StringBuffer str, byte[] array, int index)
Retrieves a null terminated substring from an array of bytes.static boolean
isNonCharacter(int ch)
Determines if codepoint is a non character(package private) static int
skipByteSubString(byte[] array, int index, int length, byte skipend)
skip substrings from an array of characters, where each character is a set of 2 bytes.(package private) static int
skipNullTermByteSubString(byte[] array, int index, int skipcount)
Skip null terminated substrings from an array of bytes.(package private) static int
toInt(char msc, char lsc)
joining 2 chars to form an int
-
-
-
Field Detail
-
NON_CHARACTER_SUFFIX_MIN_3_0_
private static final int NON_CHARACTER_SUFFIX_MIN_3_0_
Minimum suffix value that indicates if a character is non character. Unicode 3.0 non characters- See Also:
- Constant Field Values
-
NON_CHARACTER_MIN_3_1_
private static final int NON_CHARACTER_MIN_3_1_
New minimum non character in Unicode 3.1- See Also:
- Constant Field Values
-
NON_CHARACTER_MAX_3_1_
private static final int NON_CHARACTER_MAX_3_1_
New non character range in Unicode 3.1- See Also:
- Constant Field Values
-
-
Method Detail
-
isNonCharacter
public static boolean isNonCharacter(int ch)
Determines if codepoint is a non character- Parameters:
ch
- codepoint- Returns:
- true if codepoint is a non character false otherwise
-
toInt
static int toInt(char msc, char lsc)
joining 2 chars to form an int- Parameters:
msc
- most significant charlsc
- least significant char- Returns:
- int form
-
getNullTermByteSubString
static int getNullTermByteSubString(java.lang.StringBuffer str, byte[] array, int index)
Retrieves a null terminated substring from an array of bytes. Substring is a set of non-zero bytes starting from argument start to the next zero byte. If the first byte is a zero, the next byte will be taken as the first byte.- Parameters:
str
- stringbuffer to store data in, data will be store with each byte as a chararray
- byte arrayindex
- to start substring in byte count- Returns:
- the end position of the substring within the character array
-
compareNullTermByteSubString
static int compareNullTermByteSubString(java.lang.String str, byte[] array, int strindex, int aindex)
Compares a null terminated substring from an array of bytes. Substring is a set of non-zero bytes starting from argument start to the next zero byte. if the first byte is a zero, the next byte will be taken as the first byte.- Parameters:
str
- string to comparearray
- byte arraystrindex
- index within str to start comparingaindex
- array index to start in byte count- Returns:
- the end position of the substring within str if matches otherwise a -1
-
skipNullTermByteSubString
static int skipNullTermByteSubString(byte[] array, int index, int skipcount)
Skip null terminated substrings from an array of bytes. Substring is a set of non-zero bytes starting from argument start to the next zero byte. If the first byte is a zero, the next byte will be taken as the first byte.- Parameters:
array
- byte arrayindex
- to start substrings in byte countskipcount
- number of null terminated substrings to skip- Returns:
- the end position of the substrings within the character array
-
skipByteSubString
static int skipByteSubString(byte[] array, int index, int length, byte skipend)
skip substrings from an array of characters, where each character is a set of 2 bytes. substring is a set of non-zero bytes starting from argument start to the byte of the argument value. skips up to a max number of characters- Parameters:
array
- byte array to parseindex
- to start substrings in byte countlength
- the max number of bytes to skipskipend
- value of byte to skip to- Returns:
- the number of bytes skipped
-
-