ctrl + k
On This Page
Functions
String Helpers
String helpers provide utilities for manipulating and formatting strings in templates.
Functions
stringify
Converts a value to JSON string.
Template Syntax
Parameters
Name | Type | Description |
---|---|---|
a | any | The value to stringify |
Returns
string
- JSON string representation of the input.
Example
concat
Concatenates all arguments.
Template Syntax
Parameters
Name | Type | Description |
---|---|---|
args | …any | Values to concatenate |
Returns
string
- Concatenated string of all arguments.
Example
capitalize
Capitalizes the first letter of text.
Template Syntax
Parameters
Name | Type | Description |
---|---|---|
text | string | The text to capitalize |
Returns
string
- The input text with the first letter capitalized.
Example
titleCase
Converts text to title case.
Template Syntax
Parameters
Name | Type | Description |
---|---|---|
text | string | The text to convert |
Returns
string
- The input text converted to title case.
Example
tokenize
Tokenizes a string.
Template Syntax
Parameters
Name | Type | Description |
---|---|---|
string | string | The string to tokenize |
Returns
string
- The tokenized string.
Example
escapeHTML
Escapes HTML special characters in a string.
Template Syntax
Parameters
Name | Type | Description |
---|---|---|
string | string | The string to escape |
Returns
string
- The input string with HTML special characters escaped.