i18n/util

A collection of locale-aware text utility function.

import util from '@enact/i18n/util';

Members

isRtlTextFunction

isRtlText(str)Boolean

Takes content str and determines whether or not it is RTL.

1 Param
str String

A string to check the RTL-ness of.

Returns
Boolean

true if str should be RTL; false if not.

toCapitalizedFunction

toCapitalized(str)String

Capitalizes the first letter of a given string (locale aware).

1 Param
str String

The string to capitalize.

Returns
String

The capitalized string.

toWordCaseFunction

toWordCase(str)String

Capitalizes every word in a string. Words are separated by spaces, not necessarily word-breaks (locale aware).

1 Param
str String

The string to capitalize.

Returns
String

The word-cased string.

ArrayBooleanFunctionModuleNumberObjectString