Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in version 1.0.0
belongs to Maven artifact androidx.core:core:1.1.0-alpha01

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

added in version 1.0.0
public static 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

added in version 1.0.0
public static String htmlEncode (String s)

Html-encode the string.

Parameters
s String: the string to be encoded

Returns
String the encoded string