Package org.apache.abdera.i18n.text
Class CharUtils
java.lang.Object
org.apache.abdera.i18n.text.CharUtils
Deprecated.
This API is deprecated as Apache Abdera is a retired project since 2017.
General utilities for dealing with Unicode characters
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic void
append
(Appendable buf, int c) Deprecated.Append the specified codepoint to the buffer, automatically handling surrogate pairsstatic void
append
(Appendable buf, Codepoint c) Deprecated.Append the specified codepoint to the buffer, automatically handling surrogate pairsstatic Codepoint
codepointAt
(CharSequence s, int i) Deprecated.Return the codepoint at the given location, automatically dealing with surrogate pairsstatic Codepoint
codepointAt
(String s, int i) Deprecated.Return the codepoint at the given location, automatically dealing with surrogate pairsstatic int
get_index
(int[] set, int value) Deprecated.static char
getHighSurrogate
(int c) Deprecated.Get the high surrogate for a particular unicode codepointstatic char
getLowSurrogate
(int c) Deprecated.Get the low surrogate for a particular unicode codepointstatic boolean
inRange
(char[] chars, char low, char high) Deprecated.True if all the characters in chars are within the set [low,high]static boolean
inRange
(char[] chars, int low, int high) Deprecated.True if all the characters in chars are within the set [low,high]static boolean
inRange
(int codepoint, int low, int high) Deprecated.True if the codepoint is within the set [low,high]static void
insert
(CharSequence s, int i, int c) Deprecated.Insert a codepoint into the buffer, automatically dealing with surrogate pairsstatic void
insert
(CharSequence s, int i, Codepoint c) Deprecated.Insert a codepoint into the buffer, automatically dealing with surrogate pairsstatic boolean
invset_contains
(int[] set, int value) Deprecated.Treats the specified int array as an Inversion Set and returns true if the value is located within the set.static boolean
is_ifragment
(int codepoint) Deprecated.static boolean
is_ihost
(int codepoint) Deprecated.static boolean
is_ipath
(int codepoint) Deprecated.static boolean
is_ipathnodelims
(int codepoint) Deprecated.static boolean
is_ipchar
(int codepoint) Deprecated.static boolean
is_ipliteral
(int codepoint) Deprecated.static boolean
is_iprivate
(int codepoint) Deprecated.static boolean
is_iquery
(int codepoint) Deprecated.static boolean
is_iregname
(int codepoint) Deprecated.static boolean
is_iserver
(int codepoint) Deprecated.static boolean
is_iunreserved
(int codepoint) Deprecated.static boolean
is_iuserinfo
(int codepoint) Deprecated.static boolean
is_regname
(int codepoint) Deprecated.static boolean
is_ucschar
(int codepoint) Deprecated.static boolean
isAlpha
(int codepoint) Deprecated.True if the codepoint is part of the ASCII alphabet (a-z, A-Z)static boolean
Deprecated.True if the codepoint is part of the ASCII alphabet (a-z, A-Z)static boolean
isAlphaDigit
(int codepoint) Deprecated.True if isAlpha and isDigit both return truestatic boolean
isAlphaDigit
(Codepoint codepoint) Deprecated.True if isAlpha and isDigit both return truestatic boolean
isBidi
(int codepoint) Deprecated.True if the codepoint is a bidi control characterstatic boolean
Deprecated.True if the codepoint is a bidi control characterstatic boolean
isDigit
(int codepoint) Deprecated.True if the codepoint is a digitstatic boolean
Deprecated.True if the codepoint is a digitstatic boolean
isFragment
(int codepoint) Deprecated.static boolean
isGenDelim
(int codepoint) Deprecated.static boolean
isHex
(int codepoint) Deprecated.static boolean
isHighSurrogate
(char c) Deprecated.True if the specified char is a high surrogatestatic boolean
isLowSurrogate
(char c) Deprecated.True if the specified char is a low surrogatestatic boolean
isMark
(int codepoint) Deprecated.static boolean
isPath
(int codepoint) Deprecated.static boolean
isPathNoDelims
(int codepoint) Deprecated.static boolean
isPchar
(int codepoint) Deprecated.static boolean
isPctEnc
(int codepoint) Deprecated.static boolean
isQuery
(int codepoint) Deprecated.static boolean
isReserved
(int codepoint) Deprecated.static boolean
isScheme
(int codepoint) Deprecated.static boolean
isSubDelim
(int codepoint) Deprecated.static boolean
isSupplementary
(int c) Deprecated.True if the specified character is supplementalstatic boolean
isSurrogatePair
(char high, char low) Deprecated.True if the two chars represent a surrogate pairstatic boolean
isUnreserved
(int codepoint) Deprecated.static boolean
isUserInfo
(int codepoint) Deprecated.static boolean
isValid
(int c) Deprecated.True if the character is a valid unicode codepointstatic boolean
Deprecated.True if the character is a valid unicode codepointstatic int
length
(char[] c) Deprecated.Return the total number of codepoints in the buffer.static int
length
(int c) Deprecated.Return the number of characters used to represent the codepoint (will return 1 or 2)static int
Deprecated.Return the total number of codepoints in the buffer.static int
Deprecated.Return the number of characters used to represent the codepoint (will return 1 or 2)static void
setChar
(CharSequence s, int i, int c) Deprecated.Set the character at a given location, automatically dealing with surrogate pairsstatic void
setChar
(CharSequence s, int i, Codepoint c) Deprecated.Set the character at a given location, automatically dealing with surrogate pairsstatic String
Deprecated.Removes leading and trailing bidi controls from the stringstatic String
Deprecated.Removes bidi controls from within a stringstatic String
toString
(int c) Deprecated.Return the String representation of the codepoint, automatically dealing with surrogate pairsstatic Codepoint
toSupplementary
(char high, char low) Deprecated.Converts the high and low surrogate into a supplementary codepointstatic void
verify
(char[] s, CharUtils.Profile profile) Deprecated.Verifies a sequence of codepoints using the specified profilestatic void
verify
(String s, CharUtils.Profile profile) Deprecated.Verifies a sequence of codepoints using the specified profilestatic void
verify
(CodepointIterator ci, CharUtils.Profile profile) Deprecated.Verifies a sequence of codepoints using the specified filterstatic void
verify
(CodepointIterator ci, Filter filter) Deprecated.Verifies a sequence of codepoints using the specified filterstatic void
verifyNot
(char[] array, CharUtils.Profile profile) Deprecated.Verifies a sequence of codepoints using the specified profilestatic void
verifyNot
(CodepointIterator ci, CharUtils.Profile profile) Deprecated.Verifies a sequence of codepoints using the specified profilestatic void
verifyNot
(CodepointIterator ci, Filter filter) Deprecated.Verifies a sequence of codepoints using the specified filterstatic String
Deprecated.Wrap the string with the specified bidi control
-
Field Details
-
LRE
public static final char LREDeprecated.- See Also:
-
RLE
public static final char RLEDeprecated.- See Also:
-
LRO
public static final char LRODeprecated.- See Also:
-
RLO
public static final char RLODeprecated.- See Also:
-
LRM
public static final char LRMDeprecated.- See Also:
-
RLM
public static final char RLMDeprecated.- See Also:
-
PDF
public static final char PDFDeprecated.- See Also:
-
-
Method Details
-
isValid
public static boolean isValid(int c) Deprecated.True if the character is a valid unicode codepoint -
isValid
Deprecated.True if the character is a valid unicode codepoint -
inRange
public static boolean inRange(char[] chars, char low, char high) Deprecated.True if all the characters in chars are within the set [low,high] -
inRange
public static boolean inRange(char[] chars, int low, int high) Deprecated.True if all the characters in chars are within the set [low,high] -
inRange
public static boolean inRange(int codepoint, int low, int high) Deprecated.True if the codepoint is within the set [low,high] -
append
Deprecated.Append the specified codepoint to the buffer, automatically handling surrogate pairs -
append
Deprecated.Append the specified codepoint to the buffer, automatically handling surrogate pairs -
getHighSurrogate
public static char getHighSurrogate(int c) Deprecated.Get the high surrogate for a particular unicode codepoint -
getLowSurrogate
public static char getLowSurrogate(int c) Deprecated.Get the low surrogate for a particular unicode codepoint -
isHighSurrogate
public static boolean isHighSurrogate(char c) Deprecated.True if the specified char is a high surrogate -
isLowSurrogate
public static boolean isLowSurrogate(char c) Deprecated.True if the specified char is a low surrogate -
isSupplementary
public static boolean isSupplementary(int c) Deprecated.True if the specified character is supplemental -
isSurrogatePair
public static boolean isSurrogatePair(char high, char low) Deprecated.True if the two chars represent a surrogate pair -
toSupplementary
Deprecated.Converts the high and low surrogate into a supplementary codepoint -
codepointAt
Deprecated.Return the codepoint at the given location, automatically dealing with surrogate pairs -
codepointAt
Deprecated.Return the codepoint at the given location, automatically dealing with surrogate pairs -
insert
Deprecated.Insert a codepoint into the buffer, automatically dealing with surrogate pairs -
insert
Deprecated.Insert a codepoint into the buffer, automatically dealing with surrogate pairs -
setChar
Deprecated.Set the character at a given location, automatically dealing with surrogate pairs -
setChar
Deprecated.Set the character at a given location, automatically dealing with surrogate pairs -
length
Deprecated.Return the number of characters used to represent the codepoint (will return 1 or 2) -
length
public static int length(int c) Deprecated.Return the number of characters used to represent the codepoint (will return 1 or 2) -
length
Deprecated.Return the total number of codepoints in the buffer. Each surrogate pair counts as a single codepoint -
length
public static int length(char[] c) Deprecated.Return the total number of codepoints in the buffer. Each surrogate pair counts as a single codepoint -
toString
Deprecated.Return the String representation of the codepoint, automatically dealing with surrogate pairs -
stripBidi
Deprecated.Removes leading and trailing bidi controls from the string -
stripBidiInternal
Deprecated.Removes bidi controls from within a string -
wrapBidi
Deprecated.Wrap the string with the specified bidi control -
isDigit
Deprecated.True if the codepoint is a digit -
isDigit
public static boolean isDigit(int codepoint) Deprecated.True if the codepoint is a digit -
isAlpha
Deprecated.True if the codepoint is part of the ASCII alphabet (a-z, A-Z) -
isAlpha
public static boolean isAlpha(int codepoint) Deprecated.True if the codepoint is part of the ASCII alphabet (a-z, A-Z) -
isAlphaDigit
Deprecated.True if isAlpha and isDigit both return true -
isAlphaDigit
public static boolean isAlphaDigit(int codepoint) Deprecated.True if isAlpha and isDigit both return true -
isHex
public static boolean isHex(int codepoint) Deprecated. -
isBidi
Deprecated.True if the codepoint is a bidi control character -
isBidi
public static boolean isBidi(int codepoint) Deprecated.True if the codepoint is a bidi control character -
get_index
public static int get_index(int[] set, int value) Deprecated. -
invset_contains
public static boolean invset_contains(int[] set, int value) Deprecated.Treats the specified int array as an Inversion Set and returns true if the value is located within the set. This will only work correctly if the values in the int array are monotonically increasing -
isPctEnc
public static boolean isPctEnc(int codepoint) Deprecated. -
isMark
public static boolean isMark(int codepoint) Deprecated. -
isUnreserved
public static boolean isUnreserved(int codepoint) Deprecated. -
isReserved
public static boolean isReserved(int codepoint) Deprecated. -
isGenDelim
public static boolean isGenDelim(int codepoint) Deprecated. -
isSubDelim
public static boolean isSubDelim(int codepoint) Deprecated. -
isPchar
public static boolean isPchar(int codepoint) Deprecated. -
isPath
public static boolean isPath(int codepoint) Deprecated. -
isPathNoDelims
public static boolean isPathNoDelims(int codepoint) Deprecated. -
isScheme
public static boolean isScheme(int codepoint) Deprecated. -
isUserInfo
public static boolean isUserInfo(int codepoint) Deprecated. -
isQuery
public static boolean isQuery(int codepoint) Deprecated. -
isFragment
public static boolean isFragment(int codepoint) Deprecated. -
is_ucschar
public static boolean is_ucschar(int codepoint) Deprecated. -
is_iprivate
public static boolean is_iprivate(int codepoint) Deprecated. -
is_iunreserved
public static boolean is_iunreserved(int codepoint) Deprecated. -
is_ipchar
public static boolean is_ipchar(int codepoint) Deprecated. -
is_ipath
public static boolean is_ipath(int codepoint) Deprecated. -
is_ipathnodelims
public static boolean is_ipathnodelims(int codepoint) Deprecated. -
is_iquery
public static boolean is_iquery(int codepoint) Deprecated. -
is_ifragment
public static boolean is_ifragment(int codepoint) Deprecated. -
is_iregname
public static boolean is_iregname(int codepoint) Deprecated. -
is_ipliteral
public static boolean is_ipliteral(int codepoint) Deprecated. -
is_ihost
public static boolean is_ihost(int codepoint) Deprecated. -
is_regname
public static boolean is_regname(int codepoint) Deprecated. -
is_iuserinfo
public static boolean is_iuserinfo(int codepoint) Deprecated. -
is_iserver
public static boolean is_iserver(int codepoint) Deprecated. -
verify
Deprecated.Verifies a sequence of codepoints using the specified filter- Throws:
InvalidCharacterException
-
verify
public static void verify(CodepointIterator ci, CharUtils.Profile profile) throws InvalidCharacterException Deprecated.Verifies a sequence of codepoints using the specified filter- Throws:
InvalidCharacterException
-
verify
Deprecated.Verifies a sequence of codepoints using the specified profile- Throws:
InvalidCharacterException
-
verify
Deprecated.Verifies a sequence of codepoints using the specified profile- Throws:
InvalidCharacterException
-
verifyNot
Deprecated.Verifies a sequence of codepoints using the specified filter- Throws:
InvalidCharacterException
-
verifyNot
public static void verifyNot(CodepointIterator ci, CharUtils.Profile profile) throws InvalidCharacterException Deprecated.Verifies a sequence of codepoints using the specified profile- Throws:
InvalidCharacterException
-
verifyNot
public static void verifyNot(char[] array, CharUtils.Profile profile) throws InvalidCharacterException Deprecated.Verifies a sequence of codepoints using the specified profile- Throws:
InvalidCharacterException
-