The Internet Archive discovers and captures web pages through many different web crawls.
At any given time several distinct crawls are running, some for months, and some every day or longer.
View the web archive through the Wayback Machine.
Converts a CharSequence of the comma-separated form "Andy, Bob,
Charles, David" that is too wide to fit into the specified width
into one like "Andy, Bob, 2 more".
Returns the original text if it fits in the specified width
given the properties of the specified Paint,
or, if it does not fit, a truncated
copy with ellipsis character added at the specified edge or center.
Returns the original text if it fits in the specified width
given the properties of the specified Paint,
or, if it does not fit, a copy with ellipsis character added
at the specified edge or center.
Returns the length that the specified CharSequence would have if
spaces and ASCII control characters were trimmed from the start and end,
as by trim().
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
Converts a CharSequence of the comma-separated form "Andy, Bob,
Charles, David" that is too wide to fit into the specified width
into one like "Andy, Bob, 2 more".
Parameters
text
CharSequence:
the text to truncate
p
TextPaint:
the Paint with which to measure the text
avail
float:
the horizontal width available for the text
oneMore
String:
the string for "1 more" in the current locale
more
String:
the string for "%d more" in the current locale
void copySpansFrom (Spanned source,
int start,
int end,
Class kind,
Spannable dest,
int destoff)
Copies the spans from the region start...end in
source to the region
destoff...destoff+end-start in dest.
Spans in source that begin before start
or end after end but overlap this range are trimmed
as if they began at start or ended at end.
Debugging tool to print the spans in a CharSequence. The output will
be printed one span per line. If the CharSequence is not a Spanned,
then the entire string will be printed on a single line.
Returns the original text if it fits in the specified width
given the properties of the specified Paint,
or, if it does not fit, a truncated
copy with ellipsis character added at the specified edge or center.
Returns the original text if it fits in the specified width
given the properties of the specified Paint,
or, if it does not fit, a copy with ellipsis character added
at the specified edge or center.
If preserveLength is specified, the returned copy
will be padded with zero-width spaces to preserve the original
length and offsets instead of truncating.
If callback is non-null, it will be called to
report the start and end of the ellipsized range. TextDirection
is determined by the first strong directional character.
Replace instances of "^1", "^2", etc. in the
template CharSequence with the corresponding
values. "^^" is used to produce a single caret in
the output. Only up to 9 replacement values are supported,
"^10" will be produce the first replacement value followed by a
'0'.
Parameters
template
CharSequence:
the input text containing "^1"-style
placeholder values. This object is not modified; a copy is
returned.
values
CharSequence:
CharSequences substituted into the template. The
first is substituted for "^1", the second for "^2", and so on.
int getCapsMode (CharSequence cs,
int off,
int reqModes)
Determine what caps mode should be in effect at the current offset in
the text. Only the mode bits set in reqModes will be
checked. Note that the caps mode flags here are explicitly defined
to match those in InputType.
Parameters
cs
CharSequence:
The text that should be checked for caps modes.
Locale:
the Locale for which we want the layout direction. Can be null.
Returns
int
the layout direction. This may be one of:
LAYOUT_DIRECTION_LTR or
LAYOUT_DIRECTION_RTL.
Be careful: this code will need to be updated when vertical scripts will be supported
This method was deprecated
in API level 24.
Do not use.
This function only reverses individual chars and not their associated
spans. It doesn't support surrogate pairs (that correspond to non-BMP code points), combining
sequences or conjuncts either.
Returns the length that the specified CharSequence would have if
spaces and ASCII control characters were trimmed from the start and end,
as by trim().
Splits a string on a pattern. String.split() returns [''] when the string to be
split is empty. This returns []. This does not remove any empty strings from the result.
String.split() returns [''] when the string to be split is empty. This returns []. This does
not remove any empty strings from the result. For example split("a,", "," ) returns {"a", ""}.
Create a new String object containing the given range of characters
from the source string. This is different than simply calling
CharSequence.subSequence
in that it does not preserve any style runs in the source sequence,
allowing a more efficient implementation.
This site uses cookies to store your preferences for site-specific language and display options.
Hooray!
This class requires API level
or higher
This doc is hidden because your selected API level for the
documentation is . You can change the
documentation API level with the selector above the left navigation.