public abstract class UnicodeString extends Object
Modifier and Type | Field and Description |
---|---|
static UnicodeString |
EMPTY_STRING |
Constructor and Description |
---|
UnicodeString() |
Modifier and Type | Method and Description |
---|---|
abstract int |
charAt(int pos)
Get the character at a specified position
|
static boolean |
containsSurrogatePairs(CharSequence value)
Test whether a CharSequence contains Unicode codepoints outside the BMP range
|
abstract CharSequence |
getCharSequence()
Get the value of this UnicodeString as a CharSequence
|
abstract int |
indexOf(int search,
int start)
Get the first match for a given character
|
abstract boolean |
isEnd(int pos)
Ask whether a given position is at (or beyond) the end of the string
|
abstract int |
length()
Get the length of the string, in Unicode codepoints
|
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 UnicodeString |
substring(int beginIndex,
int endIndex)
Get a substring of this string
|
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 abstract UnicodeString substring(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 semanticspublic abstract int indexOf(int search, int start)
search
- the character to look forstart
- the first position to lookpublic abstract int charAt(int pos)
pos
- the index of the required character (counting
codepoints, not 16-bit characters)public abstract int length()
public abstract boolean isEnd(int pos)
pos
- the index of the required character (counting
codepoints, not 16-bit characters)public abstract CharSequence getCharSequence()
Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.