Package-level declarations

Properties

Link copied to clipboard

Returns layout direction for a given locale.

Functions

Link copied to clipboard
Link copied to clipboard

Wrap appended text in builderAction in a bold StyleSpan.

Link copied to clipboard

Builds new string by populating a newly created SpannableStringBuilder using the provided builderAction and then converting it to SpannedString.

Link copied to clipboard
inline fun Spannable.clearSpans()

Clear all spans from this text.

Link copied to clipboard

Wrap appended text in builderAction in a ForegroundColorSpan.

Link copied to clipboard
inline fun <T : Any> Spanned.getSpans(start: Int = 0, end: Int = length): Array<out T>

Get all spans that are instance of T.

Link copied to clipboard
inline fun String.htmlEncode(): String

Html-encode the string.

Link copied to clipboard

Wrap appended text in builderAction in span.

inline fun SpannableStringBuilder.inSpans(vararg spans: Any, builderAction: SpannableStringBuilder.() -> Unit): SpannableStringBuilder

Wrap appended text in builderAction in spans.

Link copied to clipboard

Returns whether the given CharSequence contains only digits.

Link copied to clipboard

Wrap appended text in builderAction in an italic StyleSpan.

Link copied to clipboard
inline fun String.parseAsHtml(flags: Int = FROM_HTML_MODE_LEGACY, imageGetter: Html.ImageGetter? = null, tagHandler: Html.TagHandler? = null): Spanned

Returns a Spanned from parsing this string as HTML.

Link copied to clipboard

Wrap appended text in builderAction in a RelativeSizeSpan.

Link copied to clipboard
inline operator fun Spannable.set(range: IntRange, span: Any)

Add span to the range of the text.

inline operator fun Spannable.set(start: Int, end: Int, span: Any)

Add span to the range startend of the text.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun Spanned.toHtml(option: Int = TO_HTML_PARAGRAPH_LINES_CONSECUTIVE): String

Returns a string of HTML from the spans in this Spanned.

Link copied to clipboard

Returns a new Spannable from CharSequence, or the source itself if it is already an instance of SpannableString.

Link copied to clipboard

Returns a new Spanned from CharSequence, or the source itself if it is already an instance of SpannedString.

Link copied to clipboard

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.

Link copied to clipboard