public final class TextUtilsCompat extends Object
Modifier and Type | Method and Description |
---|---|
static int |
getLayoutDirectionFromLocale(Locale locale)
Return the layout direction for a given Locale
|
static String |
htmlEncode(String s)
Html-encode the string.
|
public static final Locale ROOT
@NonNull public static String htmlEncode(@NonNull String s)
s
- the string to be encodedpublic static int getLayoutDirectionFromLocale(@Nullable Locale locale)
locale
- the Locale for which we want the layout direction. Can be null.ViewCompat.LAYOUT_DIRECTION_LTR
or
ViewCompat.LAYOUT_DIRECTION_RTL
.
Be careful: this code will need to be updated when vertical scripts will be supported