String helpers

lowercase

Turns a string to lowercase.

Parameter:

  • String text to modify
Handlebars Template
{{lowercase "THIS SHOULD BE LOWERCASE"}}

Result:

this should be lowercase

uppercase

Turns a string to uppercase.

Parameter:

  • String text to modify
Handlebars Template
{{uppercase "this should be lowercase"}}

Result:

THIS SHOULD BE LOWERCASE

capitalizeFirst

Capitalizes the first word in a string.

Parameter:

  • String text to modify
Handlebars Template
{{lowercase "this should be lowercase"}}

Result:

This should be lowercase

capitalizeEach

Capitalizes each word in a string.

Parameter:

  • String text to modify
Handlebars Template
{{lowercase "this should be lowercase"}}

Result:

This Should Be Lowercase

shorten

This will shorten the given text and add ellipsis if it is too long. This is done word aware.

Parameter:

  • String text to modify
  • Integer max number oof characters
Handlebars Template
{{truncate "this should be lowercase" 18}}

Result:

# this should be...

nobr

Transforms all spaces in non breaking spaces (UTF-8) for display. This helps in displaying table data in narrow html view.

Parameter:

  • String text to modify
Handlebars Template
{{nobr "15 886"}}