i18n/util
A collection of locale-aware text utility function.
import util from '@enact/i18n/util';Members
isRtlTextFunction
isRtlText( str )BooleanTakes content str and determines whether or not it is RTL.
1 Param
- str String
A string to check the RTL-ness of.
Returns
- Boolean
trueifstrshould be RTL;falseif not.
toCapitalizedFunction
toCapitalized( str )StringCapitalizes the first letter of a given string (locale aware).
1 Param
- str String
The string to capitalize.
Returns
- String
The capitalized string.
toLowerCaseFunction
toLowerCase( inString )StringLocale-safely convert a string to lower case.
1 Param
- inString String
String to convert to lower case
Returns
- String
Lower-cased string
toUpperCaseFunction
toUpperCase( inString )StringLocale-safely convert a string to upper case.
1 Param
- inString String
String to convert to upper case
Returns
- String
Upper-cased string
toWordCaseFunction
toWordCase( str )StringCapitalizes 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