> For the complete documentation index, see [llms.txt](https://monytools.gitbook.io/type/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://monytools.gitbook.io/type/strings.md).

# Strings

Auxiliary functions for String types.

### Trim

`MTools.String.Trim(string);`

| Name   | Type     | Description |
| ------ | -------- | ----------- |
| string | `string` | String/Word |

**Allows you to cut off unnecessary skips at the beginning and at the end.**\
\ <mark style="color:green;">**Example usage:**</mark>

```lua
print(MTools.String.Trim(" Hello "));
-- Returns the word 'Hello'.
```

### FirstUpper

`MTools.String.FirstUpper(string);`

| Name   | Type     | Description |
| ------ | -------- | ----------- |
| string | `string` | String/Word |

**Allows you to make the first letter of a line large.**\
\ <mark style="color:green;">**Example usage:**</mark>

```lua
print(MTools.String.FirstUpper("hello"));
-- Returns the word 'Hello'.
```

### FirstLower

`MTools.String.FirstLower(string);`

| Name   | Type     | Description |
| ------ | -------- | ----------- |
| string | `string` | String/Word |

**Allows you to make the first letter of a line small.**

<mark style="color:green;">**Example of use:**</mark>

```lua
print(MTools.String.FirstLower("HELLO"));
-- Returns the word 'hELLO'.
```

### Cut

`MTools.String.Cut(string, number);`

| Name   | Type     | Description                                                          |
| ------ | -------- | -------------------------------------------------------------------- |
| string | `string` | The line that needs to be trimmed                                    |
| number | `number` | If positive, then from the beginning; if negative, then from the end |

**Allows you to trim a line.**

<mark style="color:green;">**Example of use:**</mark>

```lua
print(MTools.String.Cut("MonyTools", 1));
-- Returns "onyTools".
print(MTools.String.Cut("MonyTools", -1));
-- Returns "MonyTool".
```
