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
ifstr
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.
toLowerCaseFunction
toLowerCase( inString )String
Locale-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 )String
Locale-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 )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