public class UnicodeChar extends UnicodeString
| Constructor and Description |
|---|
UnicodeChar(int codepoint) |
| Modifier and Type | Method and Description |
|---|---|
int |
codePointAt(long index)
Get the code point at a given position in the string
|
IntIterator |
codePoints()
Get an iterator over the code points present in the string.
|
int |
getCodepoint()
Get the codepoint represented by this
UnicodeChar |
int |
getWidth()
Get the number of bits needed to hold all the characters in this string
|
long |
indexOf(int codePoint,
long from)
Get the position of the first occurrence of the specified codepoint,
starting the search at a given position in the string
|
long |
indexWhere(java.util.function.IntPredicate predicate,
long from)
Get the position of the first occurrence of the specified codepoint,
starting the search at a given position in the string
|
long |
length()
Get the length of the string
|
UnicodeString |
substring(long start,
long end)
Get a substring of this codepoint sequence, with a given start and end position
|
java.lang.String |
toString() |
asAtomic, checkSubstringBounds, compareTo, concat, economize, equals, estimatedLength, hashCode, hasSubstring, indexOf, indexOf, isEmpty, length32, prefix, requireInt, substring, tidy, verifyCharacterspublic IntIterator codePoints()
UnicodeString has been prepared for codePoint access.codePoints in class UnicodeStringpublic int getCodepoint()
UnicodeCharpublic long length()
length in class UnicodeStringpublic int getWidth()
getWidth in class UnicodeStringpublic long indexOf(int codePoint,
long from)
indexOf in class UnicodeStringcodePoint - the sought codePointfrom - the position from which the search should start (0-based)public int codePointAt(long index)
codePointAt in class UnicodeStringindex - the given position (0-based)java.lang.IndexOutOfBoundsException - if index is not zeropublic UnicodeString substring(long start, long end)
substring in class UnicodeStringstart - the start position (0-based): that is, the position of the first
code point to be includedend - the end position (0-based): specifically, the position of the first
code point not to be includedjava.lang.IndexOutOfBoundsException - if the start/end positions are out of rangepublic long indexWhere(java.util.function.IntPredicate predicate,
long from)
indexWhere in class UnicodeStringpredicate - condition that the codepoint must satisfyfrom - the position from which the search should start (0-based)public java.lang.String toString()
toString in class java.lang.ObjectCopyright (c) 2004-2022 Saxonica Limited. All rights reserved.