public abstract class UnicodeString extends Object implements CharSequence
Modifier and Type | Field and Description |
---|---|
static UnicodeString |
EMPTY_STRING |
Constructor and Description |
---|
UnicodeString() |
Modifier and Type | Method and Description |
---|---|
static boolean |
containsSurrogatePairs(CharSequence value)
Test whether a CharSequence contains Unicode codepoints outside the BMP range
|
boolean |
equals(Object obj)
Implementations of UnicodeString can be compared with each other, but not with
other implementations of CharSequence
|
static int |
getMaxWidth(CharSequence value)
Get the maximum width of codepoints in this string, in bytes
|
int |
hashCode()
Implementations of UnicodeString can be compared with each other, but not with
other implementations of CharSequence
|
abstract boolean |
isEnd(int pos)
Ask whether a given position is at (or beyond) the end of the string
|
static UnicodeString |
makeUnicodeString(CharSequence in)
Make a UnicodeString for a given CharSequence
|
static UnicodeString |
makeUnicodeString(int[] in)
Make a UnicodeString for a given array of codepoints
|
abstract int |
uCharAt(int pos)
Get the character at a specified position
|
abstract int |
uIndexOf(int search,
int start)
Get the first match for a given character
|
abstract int |
uLength()
Get the length of the string, in Unicode codepoints
|
abstract UnicodeString |
uSubstring(int beginIndex,
int endIndex)
Get a substring of this string
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
charAt, length, subSequence, toString
public static UnicodeString EMPTY_STRING
public static UnicodeString makeUnicodeString(CharSequence in)
in
- the input CharSequencepublic static UnicodeString makeUnicodeString(int[] in)
in
- the input CharSequencepublic static boolean containsSurrogatePairs(CharSequence value)
value
- the string to be testedpublic static int getMaxWidth(CharSequence value)
value
- the string to be examinedpublic abstract UnicodeString uSubstring(int beginIndex, int endIndex)
beginIndex
- the index of the first character to be included (counting
codepoints, not 16-bit characters)endIndex
- the index of the first character to be NOT included (counting
codepoints, not 16-bit characters)IndexOutOfBoundsException
- if the selection goes off the start or end of the string
(this function follows the semantics of String.substring(), not the XPath semantics)public abstract int uIndexOf(int search, int start)
search
- the character to look forstart
- the first position to lookpublic abstract int uCharAt(int pos)
pos
- the index of the required character (counting
codepoints, not 16-bit characters)public abstract int uLength()
public abstract boolean isEnd(int pos)
pos
- the index of the required character (counting
codepoints, not 16-bit characters)public int hashCode()
public boolean equals(Object obj)
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.