TextUtilsCompat

class TextUtilsCompat
kotlin.Any
   ↳ androidx.core.text.TextUtilsCompat

Backwards compatible version of TextUtils.

Summary

Public methods
static String

Html-encode the string.

static Int

Returns the layout direction for a given Locale

Public methods

htmlEncode

static fun htmlEncode(s: String): String

Html-encode the string.

Parameters
s String: the string to be encoded
Return
String: the encoded string

getLayoutDirectionFromLocale

static fun getLayoutDirectionFromLocale(locale: Locale?): Int

Returns the layout direction for a given Locale

Parameters
locale Locale?: the Locale for which we want the layout direction, maybe be null.
Return
Int: the layout direction, either ViewCompat#LAYOUT_DIRECTION_LTR or ViewCompat#LAYOUT_DIRECTION_RTL.