public abstract class WhitespaceString extends UnicodeString
| Constructor and Description |
|---|
WhitespaceString() |
| Modifier and Type | Method and Description |
|---|---|
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
|
UnicodeString |
substring(long start,
long end)
Returns a new
UnicodeString that is a subsequence of this sequence. |
java.lang.String |
toString()
Returns a string representation of the object.
|
abstract UnicodeString |
uncompress()
Uncompress the whitespace to a (normal) UnicodeString
|
abstract void |
write(UnicodeWriter writer)
Write the value to a UnicodeWriter
|
abstract void |
writeEscape(boolean[] specialChars,
UnicodeWriter writer)
Write the value to a Writer with escaping of special characters
|
asAtomic, checkSubstringBounds, codePointAt, codePoints, compareTo, concat, economize, equals, estimatedLength, hashCode, hasSubstring, indexOf, indexOf, indexWhere, isEmpty, length, length32, prefix, requireInt, substring, tidy, verifyCharacterspublic abstract UnicodeString uncompress()
public int getWidth()
UnicodeStringgetWidth in class UnicodeStringpublic UnicodeString substring(long start, long end)
UnicodeString that is a subsequence of this sequence.
The subsequence starts with the codepoint value at the specified index and
ends with the codepoint value at index end - 1. The length
(in codepoints) of thereturned sequence is end - start, so if start == end
then an empty sequence is returned.substring in class UnicodeStringstart - the start index, inclusiveend - the end index, exclusivejava.lang.IndexOutOfBoundsException - if start or end are negative,
if end is greater than length(),
or if start is greater than endpublic long indexOf(int codePoint,
long from)
UnicodeStringindexOf in class UnicodeStringcodePoint - the sought codePointfrom - the position from which the search should start (0-based)public java.lang.String toString()
toString in class java.lang.Objectpublic abstract void write(UnicodeWriter writer) throws java.io.IOException
writer - the writer to write tojava.io.IOException - if an error occurs downstreampublic abstract void writeEscape(boolean[] specialChars,
UnicodeWriter writer)
throws java.io.IOException
specialChars - identifies which characters are considered specialwriter - the writer to write tojava.io.IOException - if an error occurs downstreamCopyright (c) 2004-2022 Saxonica Limited. All rights reserved.