5.7.1.1.1. String functions
The following table shows the build-in functions in the expression language of the Code Composer related to Strings.
Name |
Description |
---|---|
allLower |
Converts all characters in a String to lower case. |
allUpper |
Converts all characters in a String to upper case. |
camelCaseToTitleFormat |
Converts String from camel case to title format |
camelToAllUpperUnderscore |
Converts String from camel case to all upper case with underscores |
camelToKebabCase |
Converts String from camel case to kebab case |
camelToSnakeCase |
Converts String camel case to snake case. |
firstLower |
Converts the first character in a String to lower case. |
firstUpper |
Converts the first character in a String to upper case. |
5.7.1.1.1.1. allLower
The following table shows the documentation of the allLower function.
Category |
expression language/functions/build-in functions/String functions |
||||||
Signature |
allLower(String text) : String |
||||||
Description |
Converts all characters in a String to lower case |
||||||
Arguments |
text: String to be converted to all lower case |
||||||
Returns |
argument String converted to all lower case |
||||||
Exceptions |
none |
||||||
Example |
allLower(“appName”) returns “appname” |
||||||
Usage |
|
5.7.1.1.1.2. allUpper
The following table shows the documentation of the allUpper function.
Category |
expression language/functions/build-in functions/String functions |
||||||
Signature |
allUpper(String text) : String |
||||||
Description |
Converts all characters in a String to upper case |
||||||
Arguments |
text: String to be converted to all upper case |
||||||
Returns |
argument String converted to all upper case |
||||||
Exceptions |
none |
||||||
Example |
allUpper(“appName”) returns “APPNAME” |
||||||
Usage |
|
5.7.1.1.1.3. camelCaseToTitleFormat
The following table shows the documentation of the camelCaseToTitleFormat function.
Category |
expression language/functions/build-in functions/String functions |
||||||
Signature |
camelCaseToTitleFormat(String text) : String |
||||||
Description |
convert string from camel case to title format The first word of the title and subtitle are uppercased, and major words have the first letter of the word capitalized. Example: Average Number of Donuts |
||||||
Arguments |
text: string in camel case to be converted to title format |
||||||
Returns |
argument string in camel case converted to title format |
||||||
Exceptions |
none |
||||||
Example |
camelCaseToTitleFormat(“appName”) returns “App Name”. |
||||||
Usage |
|
5.7.1.1.1.4. camelToAllUpperUnderscore
The following table shows the documentation of the camelToAllUpperUnderscore function.
Category |
expression language/functions/build-in functions/String functions |
||||||
Signature |
camelToAllUpperUnderscore(String text) : String |
||||||
Description |
convert string from camel case to all upper case with underscores Example: AVERAGE_NUMBER_OF_DONUTS |
||||||
Arguments |
text: string in camel case to be converted to all upper case with underscores |
||||||
Returns |
argument string in camel case converted to all upper case with underscores |
||||||
Exceptions |
none |
||||||
Example |
camelToAllUpperUnderscore(“firstItem”) returns “FIRST_ITEM”. |
||||||
Usage |
|
5.7.1.1.1.5. camelToKebabCase
The following table shows the documentation of the camelToKebabCase function.
Category |
expression language/functions/build-in functions/String functions |
||||||
Signature |
camelToKebabCase(String text) : String |
||||||
Description |
Converts String from camel case to kebab case. In kebab case all parts of a name are in lower case and connected by hyphens. Example: average-number-of-donuts |
||||||
Arguments |
text: String in camel case to be converted to kebab case |
||||||
Returns |
argument string converted to kebab case |
||||||
Exceptions |
none |
||||||
Example |
camelToKebabCase(“appName”) returns “app-name” |
||||||
Usage |
|
5.7.1.1.1.6. camelToSnakeCase
The following table shows the documentation of the camelToSnakeCase function.
Category |
expression language/functions/build-in functions/String functions |
||||||
Signature |
camelToSnakeCase(String text) : String |
||||||
Description |
Converts String from camel case to snake case. In snake case all parts of a name are in lower case and connected by underscores. Example: average_number_of_donuts |
||||||
Arguments |
text: string in camel case to be converted to snake case |
||||||
Returns |
argument string in camel case converted to snake case. |
||||||
Exceptions |
none |
||||||
Example |
camelToSnakeCase(“appName”) returns “app_name” |
||||||
Usage |
|
5.7.1.1.1.7. firstLower
The following table shows the documentation of the firstLower function.
Category |
expression language/functions/build-in functions/String functions |
||||||
Signature |
firstLower(String text) : String |
||||||
Description |
Converts the first character of a String to lower case. |
||||||
Arguments |
text : String of which first character needs to be converted to lower case |
||||||
Returns |
argument String with first character converted to lower case |
||||||
Exceptions |
none |
||||||
Example |
firstLower(“AppName”) returns “appName” |
||||||
Usage |
|
5.7.1.1.1.8. firstUpper
The following table shows the documentation of the firstUpper function.
Category |
expression language/functions/build-in functions/String functions |
||||||
Signature |
firstUpper(String text) : String |
||||||
Description |
Converts the first character in a String to upper case.. |
||||||
Arguments |
text: String of which first character needs to be converted to upper case |
||||||
Returns |
argument String with first character converted to upper case |
||||||
Exceptions |
none |
||||||
Example |
firstUpper(“appName”) returns “AppName” |
||||||
Usage |
|