Java android.text TextUtils fields, constructors, methods, implement or subclass

Example usage for Java android.text TextUtils fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.text TextUtils.

The text is from its open source code.

Field

Parcelable.CreatorCHAR_SEQUENCE_CREATOR
intCAP_MODE_CHARACTERS
Capitalization mode for #getCapsMode : capitalize all characters.
intCAP_MODE_WORDS
Capitalization mode for #getCapsMode : capitalize the first character of all words.
intCAP_MODE_SENTENCES
Capitalization mode for #getCapsMode : capitalize the first character of each sentence.

Method

CharSequenceconcat(CharSequence... text)
Returns a CharSequence concatenating the specified CharSequences, retaining their spans if any.
voidcopySpansFrom(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.
CharSequenceellipsize(CharSequence text, TextPaint p, float avail, TruncateAt where)
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.
booleanequals(CharSequence a, CharSequence b)
Returns true if a and b are equal, including if they are both null.
CharSequenceexpandTemplate(CharSequence template, CharSequence... values)
Replace instances of "^1", "^2", etc.
voidgetChars(CharSequence s, int start, int end, char[] dest, int destoff)
intgetLayoutDirectionFromLocale(Locale locale)
Return the layout direction for a given Locale
intgetTrimmedLength(CharSequence s)
Returns the length that the specified CharSequence would have if spaces and ASCII control characters were trimmed from the start and end, as by String#trim .
StringhtmlEncode(String s)
Html-encode the string.
intindexOf(CharSequence s, char ch)
intindexOf(CharSequence s, CharSequence needle)
intindexOf(CharSequence s, char ch, int start, int end)
intindexOf(CharSequence s, CharSequence needle, int start, int end)
booleanisDigitsOnly(CharSequence str)
Returns whether the given CharSequence contains only digits.
booleanisEmpty(@Nullable CharSequence str)
Returns true if the string is null or 0-length.
booleanisGraphic(CharSequence str)
Returns whether the given CharSequence contains any printable characters.
booleanisGraphic(char c)
Returns whether this character is a printable character.
booleanisPrintableAsciiOnly(final CharSequence str)
Stringjoin(@NonNull CharSequence delimiter, @NonNull Object[] tokens)
Returns a string containing the tokens joined by delimiters.
Stringjoin(@NonNull CharSequence delimiter, @NonNull Iterable tokens)
Returns a string containing the tokens joined by delimiters.
intlastIndexOf(CharSequence s, char ch)
booleanregionMatches(CharSequence one, int toffset, CharSequence two, int ooffset, int len)
CharSequencereplace(CharSequence template, String[] sources, CharSequence[] destinations)
Return a new CharSequence in which each of the source strings is replaced by the corresponding element of the destinations.
String[]split(String text, String expression)
This method yields the same result as text.split(expression, -1) except that if text.isEmpty() then this method returns an empty array whereas "".split(expression, -1) would have returned an array with a single "" .
String[]split(String text, Pattern pattern)
Splits a string on a pattern.
CharSequencestringOrSpannedString(CharSequence source)
Stringsubstring(CharSequence source, int start, int end)
Create a new String object containing the given range of characters from the source string.
voidwriteToParcel(CharSequence cs, Parcel p, int parcelableFlags)
Flatten a CharSequence and whatever styles can be copied across processes into the parcel.