belongs to Maven artifact androidx.core:core:1.0.0-alpha1

TextUtilsCompat

public final class TextUtilsCompat
extends Object

java.lang.Object
   ↳ androidx.core.text.TextUtilsCompat


Backwards compatible version of TextUtils.

Summary

Public methods

static int getLayoutDirectionFromLocale(Locale locale)

Returns the layout direction for a given Locale

static String htmlEncode(String s)

Html-encode the string.

Inherited methods

Public methods

getLayoutDirectionFromLocale

int getLayoutDirectionFromLocale (Locale locale)

Returns the layout direction for a given Locale

Parameters
locale Locale: the Locale for which we want the layout direction, maybe be null.

Returns
int the layout direction, either ViewCompat.LAYOUT_DIRECTION_LTR or ViewCompat.LAYOUT_DIRECTION_RTL.

htmlEncode

String htmlEncode (String s)

Html-encode the string.

Parameters
s String: the string to be encoded

Returns
String the encoded string