Package com.ibm.icu.impl
Class UCharacterUtility
java.lang.Object
com.ibm.icu.impl.UCharacterUtility
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
FieldsModifier and TypeFieldDescriptionprivate static final int
New non character range in Unicode 3.1private static final int
New minimum non character in Unicode 3.1private static final int
Minimum suffix value that indicates if a character is non character. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
private constructor to avoid initialization -
Method Summary
Modifier and TypeMethodDescription(package private) static int
compareNullTermByteSubString
(String str, byte[] array, int strindex, int aindex) Compares a null terminated substring from an array of bytes.(package private) static int
getNullTermByteSubString
(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 Details
-
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:
-
NON_CHARACTER_MIN_3_1_
private static final int NON_CHARACTER_MIN_3_1_New minimum non character in Unicode 3.1- See Also:
-
NON_CHARACTER_MAX_3_1_
private static final int NON_CHARACTER_MAX_3_1_New non character range in Unicode 3.1- See Also:
-
-
Constructor Details
-
UCharacterUtility
private UCharacterUtility()private constructor to avoid initialization
-
-
Method Details
-
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
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
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
-