@Immutable public final class CodepointUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static char |
LRE |
static char |
LRM |
static char |
LRO |
static char |
PDF |
static char |
RLE |
static char |
RLM |
static char |
RLO |
| Modifier and Type | Method and Description |
|---|---|
static Codepoint |
codepointAt(CharSequence s,
int i)
Return the codepoint at the given location, automatically dealing with
surrogate pairs
|
static char[] |
getAsCharArray(int c)
Return the char[] representation of the codepoint, automatically dealing
with surrogate pairs
|
static String |
getAsString(int c)
Return the String representation of the codepoint, automatically dealing
with surrogate pairs
|
static char |
getHighSurrogate(int c)
Get the high surrogate for a particular unicode codepoint
|
static int |
getIndex(int[] aCodepointSet,
int nValue) |
static char |
getLowSurrogate(int c)
Get the low surrogate for a particular unicode codepoint
|
static boolean |
inRange(char[] chars,
char low,
char high)
True if all the characters in chars are within the set [low,high]
|
static boolean |
inRange(char[] chars,
int low,
int high)
True if all the characters in chars are within the set [low,high]
|
static boolean |
inRange(int codepoint,
int low,
int high)
True if the codepoint is within the set [low,high]
|
static void |
insert(CharSequence s,
int i,
Codepoint c)
Insert a codepoint into the buffer, automatically dealing with surrogate
pairs
|
static void |
insert(CharSequence s,
int i,
int c)
Insert a codepoint into the buffer, automatically dealing with surrogate
pairs
|
static boolean |
inverseSetContains(int[] aCodepointSet,
int value)
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) |
static boolean |
is_ihost(int codepoint) |
static boolean |
is_ipath(int codepoint) |
static boolean |
is_ipathnodelims(int codepoint) |
static boolean |
is_ipchar(int codepoint) |
static boolean |
is_ipliteral(int codepoint) |
static boolean |
is_iprivate(int codepoint) |
static boolean |
is_iquery(int codepoint) |
static boolean |
is_iregname(int codepoint) |
static boolean |
is_iserver(int codepoint) |
static boolean |
is_iunreserved(int codepoint) |
static boolean |
is_iuserinfo(int codepoint) |
static boolean |
is_regname(int codepoint) |
static boolean |
is_ucschar(int codepoint) |
static boolean |
isAlpha(Codepoint codepoint)
True if the codepoint is part of the ASCII alphabet (a-z, A-Z)
|
static boolean |
isAlpha(int codepoint)
True if the codepoint is part of the ASCII alphabet (a-z, A-Z)
|
static boolean |
isAlphaDigit(Codepoint codepoint)
True if isAlpha and isDigit both return true
|
static boolean |
isAlphaDigit(int codepoint)
True if isAlpha and isDigit both return true
|
static boolean |
isBidi(Codepoint codepoint)
True if the codepoint is a bidi control character
|
static boolean |
isBidi(int codepoint)
True if the codepoint is a bidi control character
|
static boolean |
isDigit(Codepoint codepoint)
True if the codepoint is a digit
|
static boolean |
isDigit(int codepoint)
True if the codepoint is a digit
|
static boolean |
isFragment(int codepoint) |
static boolean |
isGenDelim(int codepoint) |
static boolean |
isHex(int codepoint) |
static boolean |
isMark(int codepoint) |
static boolean |
isPath(int codepoint) |
static boolean |
isPathNoDelims(int codepoint) |
static boolean |
isPchar(int codepoint) |
static boolean |
isPctEnc(int codepoint) |
static boolean |
isQuery(int codepoint) |
static boolean |
isReserved(int codepoint) |
static boolean |
isScheme(int codepoint) |
static boolean |
isSubDelim(int codepoint) |
static boolean |
isUnreserved(int codepoint) |
static boolean |
isUserInfo(int codepoint) |
static int |
length(AbstractCodepointIterator ci) |
static int |
length(char[] c)
Return the total number of codepoints in the buffer.
|
static int |
length(CharSequence c)
Return the total number of codepoints in the buffer.
|
static void |
setChar(CharSequence s,
int i,
Codepoint c)
Set the character at a given location, automatically dealing with surrogate
pairs
|
static void |
setChar(CharSequence s,
int i,
int c)
Set the character at a given location, automatically dealing with surrogate
pairs
|
static String |
stripBidi(String s)
Removes leading and trailing bidi controls from the string
|
static String |
stripBidiInternal(String s)
Removes bidi controls from within a string
|
static void |
verify(AbstractCodepointIterator ci,
ECodepointProfile profile)
Verifies a sequence of codepoints using the specified filter
|
static void |
verify(AbstractCodepointIterator ci,
ICodepointFilter filter)
Verifies a sequence of codepoints using the specified filter
|
static void |
verify(char[] s,
ECodepointProfile profile)
Verifies a sequence of codepoints using the specified profile
|
static void |
verify(String s,
ECodepointProfile profile)
Verifies a sequence of codepoints using the specified profile
|
static void |
verifyNot(char[] array,
ECodepointProfile profile)
Verifies a sequence of codepoints using the specified profile
|
static void |
verifyNot(ICodepointIterator ci,
ECodepointProfile profile)
Verifies a sequence of codepoints using the specified profile
|
static void |
verifyNot(ICodepointIterator ci,
ICodepointFilter filter)
Verifies a sequence of codepoints using the specified filter
|
static String |
wrapBidi(String s,
char c)
Wrap the string with the specified bidi control
|
public static final char LRE
public static final char RLE
public static final char LRO
public static final char RLO
public static final char LRM
public static final char RLM
public static final char PDF
public static boolean inRange(char[] chars,
char low,
char high)
public static boolean inRange(char[] chars,
int low,
int high)
public static boolean inRange(int codepoint,
int low,
int high)
public static char getHighSurrogate(int c)
public static char getLowSurrogate(int c)
@Nonnull public static Codepoint codepointAt(@Nonnull CharSequence s, int i)
public static void insert(CharSequence s, int i, @Nonnull Codepoint c)
public static void insert(@Nonnull CharSequence s, int i, int c)
public static void setChar(@Nonnull CharSequence s, int i, @Nonnull Codepoint c)
public static void setChar(@Nonnull CharSequence s, int i, int c)
public static int length(@Nonnull CharSequence c)
public static int length(@Nonnull char[] c)
public static int length(@Nonnull AbstractCodepointIterator ci)
@Nonnull @Nonempty public static char[] getAsCharArray(int c)
@Nonnull @Nonempty public static String getAsString(int c)
@Nullable public static String stripBidi(@Nullable String s)
@Nonnull public static String stripBidiInternal(@Nonnull String s)
public static String wrapBidi(@Nonnull String s, char c)
public static boolean isDigit(@Nonnull Codepoint codepoint)
public static boolean isDigit(int codepoint)
public static boolean isAlpha(@Nonnull Codepoint codepoint)
public static boolean isAlpha(int codepoint)
public static boolean isAlphaDigit(@Nonnull Codepoint codepoint)
public static boolean isAlphaDigit(int codepoint)
public static boolean isHex(int codepoint)
public static boolean isBidi(@Nonnull Codepoint codepoint)
public static boolean isBidi(int codepoint)
@CheckForSigned public static int getIndex(@Nonnull int[] aCodepointSet, int nValue)
public static boolean inverseSetContains(@Nonnull int[] aCodepointSet, int value)
public static boolean isPctEnc(int codepoint)
public static boolean isMark(int codepoint)
public static boolean isUnreserved(int codepoint)
public static boolean isReserved(int codepoint)
public static boolean isGenDelim(int codepoint)
public static boolean isSubDelim(int codepoint)
public static boolean isPchar(int codepoint)
public static boolean isPath(int codepoint)
public static boolean isPathNoDelims(int codepoint)
public static boolean isScheme(int codepoint)
public static boolean isUserInfo(int codepoint)
public static boolean isQuery(int codepoint)
public static boolean isFragment(int codepoint)
public static boolean is_ucschar(int codepoint)
public static boolean is_iprivate(int codepoint)
public static boolean is_iunreserved(int codepoint)
public static boolean is_ipchar(int codepoint)
public static boolean is_ipath(int codepoint)
public static boolean is_ipathnodelims(int codepoint)
public static boolean is_iquery(int codepoint)
public static boolean is_ifragment(int codepoint)
public static boolean is_iregname(int codepoint)
public static boolean is_ipliteral(int codepoint)
public static boolean is_ihost(int codepoint)
public static boolean is_regname(int codepoint)
public static boolean is_iuserinfo(int codepoint)
public static boolean is_iserver(int codepoint)
public static void verify(AbstractCodepointIterator ci, ICodepointFilter filter)
public static void verify(AbstractCodepointIterator ci, @Nonnull ECodepointProfile profile)
public static void verify(@Nullable char[] s, @Nonnull ECodepointProfile profile)
public static void verify(@Nullable String s, @Nonnull ECodepointProfile profile)
public static void verifyNot(ICodepointIterator ci, ICodepointFilter filter)
public static void verifyNot(ICodepointIterator ci, @Nonnull ECodepointProfile profile)
public static void verifyNot(char[] array,
@Nonnull
ECodepointProfile profile)
Copyright © 2006–2015 phloc systems. All rights reserved.