> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.pdfgeneratorapi.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# String functions


##### Uppercase
To display data field value in uppercase, use following expression. 
```
{% uppercase({dataFieldName}) %}
```

##### Lowercase
To display data field value in lowercase, use following expression. 
```
{% lowercase({dataFieldName}) %}
```

##### Capitalize
Uppercase the first character of each word in a string. 
```
{% capitalize({dataFieldName}) %}
```

##### Split
The **split(delimiter, string)** function allows to split string into an array. 
```
{% split("_", "Some_string") %} => ["Some", "string"]
```

##### Replace
The `str_replace([string: search], [string: replace], [string: the original string])` function replaces all occurrences of a substring within a string.
```
{% str_replace("dog", "cat", "this is dog") %}
```
 This expression output is: *this is cat*

|| The first two parameters can also be arrays that specify search and replace values e.g. {% str_replace(["dog", " is"], ["cat", " is not"], "this is dog") %} => this is not cat

##### Substring
The `substr ( string $string , int $offset , int|null $length = null )` returns the portion of string specified by the offset and length parameters.

```
{% substr("This is test", 0, 2) %} // Result: Th
{% substr("This is test", 1, 2) %} // Result: hi
{% substr("This is test", -2) %} // Result: st
```

##### Count
The **count({stringData})** returns the length of the string
```
{% count("abcd") %} // Result: 4
```
---
### Related articles you may find helpful

* [How to copy a template between workspaces?](/en/article/how-to-copy-a-template-between-workspaces-1ufgb2i/)
* [Is it possible to conditionally change the component style or hide the component?](/en/article/is-it-possible-to-conditionally-change-the-component-style-or-hide-the-component-z8nmwg/)
* [Text Component](/en/article/text-component-c3s12i/)
