<commit_before># Numbers & Text > Text

***

## Conversion

### <a name="tostring"></a> Convert to Text

![convert-text-block](http://static.stencyl.com/pedia2/blocks/numbers_text/text/Conversion.png)

Converts the given value to text.

```
("" + [VALUE])
```

***

## Operations

### <a name="str-length"></a> Text Length

![length-block](http://static.stencyl.com/pedia2/blocks/numbers_text/text/TextLength.png)

Returns the number of characters in the given text.

```
[TEXT].length
```

***

### <a name="str-combine"></a> Combine Text

![combine-block](http://static.stencyl.com/pedia2/block-images/4%20-%20Numbers%20%20Text/2%20-%20Text/str-combine.png)

Combines the two given pieces of text into one and returns that result.

```
[TEXT] + [TEXT]
```

***

### <a name="str-trim"></a> Trim Text

![trim-block](http://static.stencyl.com/pedia2/blocks/numbers_text/text/Operations_TrimSpace.png)

Removes spaces at the end of the given text.

```
StringTools.trim([TEXT])
```

***

## Comparison<commit_msg>Update text.md<commit_after># Numbers & Text > Text

***

## Conversion

### <a name="tostring"></a> Convert to Text

![convert-text-block](http://static.stencyl.com/pedia2/blocks/numbers_text/text/Conversion.png)

Converts the given value to text.

```
("" + [VALUE])
```

***

## Operations

### <a name="str-length"></a> Text Length

![length-block](http://static.stencyl.com/pedia2/blocks/numbers_text/text/TextLength.png)

Returns the number of characters in the given text.

```
[TEXT].length
```

***

### <a name="str-combine"></a> Combine Text

![combine-block](http://static.stencyl.com/pedia2/block-images/4%20-%20Numbers%20%20Text/2%20-%20Text/str-combine.png)

Combines the two given pieces of text into one and returns that result.

```
[TEXT] + [TEXT]
```

***

### <a name="str-trim"></a> Trim Text

![trim-block](http://static.stencyl.com/pedia2/blocks/numbers_text/text/Operations_TrimSpace.png)

Removes spaces from the beginning and the end of the given text and returns that result. (When given an attribute, the value of the attribute remains unchanged.)

```
StringTools.trim([TEXT])
```

***

## Comparison
{'fraction_non_alphanumeric': 0.1900093370681606, 'fraction_numerical': 0.01680672268907563, 'mean_word_length': 4.609947643979058, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5199215', 'n_tokens_mistral': 796, 'n_tokens_neox': 752, 'n_words': 158}