Skip to content
Enact

A collection of locale-aware text utility function.

isRtlText( str )  Boolean

Takes content str and determines whether or not it is /docs/developer-guide/glossary/#rtl/docs/developer-guide/glossary/#rtl.

1 Param
strString

A string to check the /docs/developer-guide/glossary/#rtl/docs/developer-guide/glossary/#rtl-ness of.

Returns
Boolean

true if str should be RTL; false if not.

toCapitalized( str )  String

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

1 Param
strString

The string to capitalize.

Returns
String

The capitalized string.

toLowerCase( inString )  String

Locale-safely convert a string to lower case.

1 Param
inStringString

String to convert to lower case

Returns
String

Lower-cased string

toUpperCase( inString )  String

Locale-safely convert a string to upper case.

1 Param
inStringString

String to convert to upper case

Returns
String

Upper-cased string

toWordCase( str )  String

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

1 Param
strString

The string to capitalize.

Returns
String

The word-cased string.