> For the complete documentation index, see [llms.txt](https://docs.thunkable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thunkable.com/snap-to-place/text.md).

# Text

## Text Value

### String

The most basic but most often used text block is below. You can type into this text block, or leave it empty.

![](https://689802330-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-LAn5wecEraNWaG7Ig2g%2F-LAn6C6AZqkMi5AKxsSc%2Fblocks-text-%E2%9C%95-fig-2.png?generation=1524497176994951\&alt=media)

### Join

Often, you'll want to join text values together with the `join` block:

![](https://689802330-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MXlA3SOyr9PkOYkY1QO%2F-MXlAGGWtGla4bKTIjFO%2FScreen%20Shot%202021-04-08%20at%2012.10.19%20PM.png?alt=media\&token=92ec4da7-66ed-4d8f-a8f2-644e9864d916)

### Newline

You can use the `newline` block to add a line break in a piece of text.

![](https://689802330-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MJWI5X5jP9bkWrMzdya%2F-MJWI9weiKw3MImXY3aY%2Ftextblocks%20newline.png?alt=media\&token=a6a168f5-7a63-4811-9f64-7f273e18c45f)

## Reformat Text

Use these blocks to change the content or formatting of your text. These blocks will return the reformatted text.

### Set case

Set a piece of text to the selected case:

![](https://689802330-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MXlA3SOyr9PkOYkY1QO%2F-MXlAl2bIim8u--oAh01%2FScreen%20Shot%202021-04-08%20at%2012.12.29%20PM.png?alt=media\&token=0bce8cc4-4991-44dc-a0ce-f3b722ed6fa3)

### Trim Spaces

Trim blank spaces from the left side, the right side, or both sides of a string of text:

![](https://689802330-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MXlA3SOyr9PkOYkY1QO%2F-MXlAt1Rgq8dyhhqrPPp%2FScreen%20Shot%202021-04-08%20at%2012.13.02%20PM.png?alt=media\&token=25cd5f1b-5efe-442f-8824-63d95a2e2764)

### Replace all

Find and replace all occurrences of a substring within a string.

![](https://689802330-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MJWIPO3KnSS0WmL2LIB%2F-MJWJZ0ez6_JbHEvLqj8%2Ftextblocks%20replace.png?alt=media\&token=a5061e5a-ba8e-4582-860c-91f7ecdd7d37)

## Analyze Text

### Is Empty

The block below tests whether the text value is empty. Returns `true` or `false`

![](https://689802330-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-LAn5wecEraNWaG7Ig2g%2F-LAn6CCW75867iRh0PFG%2Fblocks-text-%E2%9C%95-fig-5.png?generation=1524497176912938\&alt=media)

### Get letter

Returns the character at the specified position, where 1 is the first letter of the string.\
Returns the empty string if the length of text given is less than the position specified.

![](https://689802330-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MXlA3SOyr9PkOYkY1QO%2F-MXlAadUQi2xiFFPC-zr%2FScreen%20Shot%202021-04-08%20at%2012.11.46%20PM.png?alt=media\&token=988eb66c-a246-4e09-888f-06a2cdac94d0)

### Get substring

Returns the substring at the specified start and end position, where 1 is the first letter of the string.\
Returns the empty string if the length of text given is less than the starting position specified.

![](https://689802330-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MXlA3SOyr9PkOYkY1QO%2F-MXlB3LQBEg9lBhJ2N3R%2FScreen%20Shot%202021-04-08%20at%2012.13.47%20PM.png?alt=media\&token=d6dab221-797c-4a19-a432-e47586bf84ad)

![](https://689802330-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MXlA3SOyr9PkOYkY1QO%2F-MXlB7cyOVC-rU6mfoMl%2FScreen%20Shot%202021-04-08%20at%2012.14.08%20PM.png?alt=media\&token=0442413b-f1f8-4420-b2a7-a072142f5d24)

### Find first/last occurrence

Returns the starting position of a substring within a string, where 1 is the first letter of the string.\
Returns 0 if the string does not contain the substring.

![](https://689802330-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MXlA3SOyr9PkOYkY1QO%2F-MXlBI1_FRJVDfeHE8h-%2FScreen%20Shot%202021-04-08%20at%2012.14.48%20PM.png?alt=media\&token=e5f1e863-81a1-4a85-b20c-b2308a0bb407)

### Does string contain

Checks if a string contains a substring. Returns `true` or `false`.&#x20;

![](https://689802330-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MJWIPO3KnSS0WmL2LIB%2F-MJWJ4McB0hDZMaujH8M%2Ftextblocks%20does%20contain.png?alt=media\&token=88f3faf7-6820-4135-9e8a-f5ceaaf4e544)

### Get length of string

Returns length of a given string

![](https://689802330-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-LAn5wecEraNWaG7Ig2g%2F-LAn6CHAI5q3q4Ac_cj0%2Fblocks-text-%E2%9C%95-fig-4.png?generation=1524497177020895\&alt=media)
