
ctrl+k
Enter a search term above to see results...
Enter a search term above to see results...
String helpers provide utilities for manipulating and formatting strings in templates.
Converts a value to JSON string.
{stringify objectToStringify}
Name | Type | Description |
---|---|---|
a | any | The value to stringify |
string
- JSON string representation of the input.
<pre>{stringify user}</pre>
Concatenates all arguments.
{concat firstName ' ' lastName}
Name | Type | Description |
---|---|---|
args | …any | Values to concatenate |
string
- Concatenated string of all arguments.
<h1>Welcome, {concat user.firstName ' ' user.lastName}!</h1>
Capitalizes the first letter of text.
{capitalize textToCapitalize}
Name | Type | Description |
---|---|---|
text | string | The text to capitalize |
string
- The input text with the first letter capitalized.
<p>{capitalize pageTitle}</p>
Converts text to title case.
{titleCase textToTitleCase}
Name | Type | Description |
---|---|---|
text | string | The text to convert |
string
- The input text converted to title case.
<h2>{titleCase article.title}</h2>
Tokenizes a string.
{tokenize stringToTokenize}
Name | Type | Description |
---|---|---|
string | string | The string to tokenize |
string
- The tokenized string.
<div id="{tokenize sectionTitle}"> <h3>{sectionTitle}</h3></div>
Escapes HTML special characters in a string.
{escapeHTML stringToEscape}
Name | Type | Description |
---|---|---|
string | string | The string to escape |
string
- The input string with HTML special characters escaped.
<div title="{escapeHTML userInput}"> {userInput}</div>
<h3>User Bio</h3><p> {#html escapeHTML bioHTML}</p>