mirror of
https://github.com/kemko/liquid.git
synced 2026-01-01 15:55:40 +03:00
capitalize also downcases each remaining letter
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
---
|
||||
title: capitalize
|
||||
description: Liquid filter that capitalizes the first character of a string.
|
||||
description: Liquid filter that capitalizes the first character of a string and downcases the remaining characters.
|
||||
---
|
||||
|
||||
Makes the first character of a string capitalized.
|
||||
Makes the first character of a string capitalized and converts the remaining characters to lowercase.
|
||||
|
||||
<p class="code-label">Input</p>
|
||||
```liquid
|
||||
@@ -22,11 +22,11 @@ Makes the first character of a string capitalized.
|
||||
<p class="code-label">Input</p>
|
||||
```liquid
|
||||
{% raw %}
|
||||
{{ "my great title" | capitalize }}
|
||||
{{ "my GREAT title" | capitalize }}
|
||||
{% endraw %}
|
||||
```
|
||||
|
||||
<p class="code-label">Output</p>
|
||||
```text
|
||||
{{ "my great title" | capitalize }}
|
||||
{{ "my GREAT title" | capitalize }}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user