# string: World of Warcraft Forever API

Forever 1.60.1 (70959), Interface 16001, Lua 5.1, from Blizzard's own API documentation. Page: https://wowaddons.gg/forever-api/string

## Functions

### string.ltrim

```lua
trimmed = string.ltrim(str, [characters])
```

Returns a string with all bytes in the specified character set removed from the start.

Arguments:
- `str`: stringView. The string to trim.
- `characters`: stringView, default " \\r\\n\\t". The set of bytes to remove.

Returns:
- `trimmed`: stringView. The left-trimmed string.

### string.rtrim

```lua
trimmed = string.rtrim(str, [characters])
```

Returns a string with all bytes in the specified character set removed from the end.

Arguments:
- `str`: stringView. The string to trim.
- `characters`: stringView, default " \\r\\n\\t". The set of bytes to remove.

Returns:
- `trimmed`: stringView. The right-trimmed string.

### string.contains

```lua
contains = string.contains(str, substring)
```

Returns true if a string contains the specified literal substring.

Arguments:
- `str`: stringView. The string to search.
- `substring`: stringView. The literal substring for which to search.

Returns:
- `contains`: bool. True if the string contains the specified substring; otherwise false.

### string.endswith

```lua
endsWith = string.endswith(str, suffix)
```

Returns true if a string ends with the specified suffix.

Arguments:
- `str`: stringView. The string to inspect.
- `suffix`: stringView. The suffix for which to search.

Returns:
- `endsWith`: bool. True if the string ends with the specified suffix; otherwise false.

### string.startswith

```lua
startsWith = string.startswith(str, prefix)
```

Returns true if a string starts with the specified prefix.

Arguments:
- `str`: stringView. The string to inspect.
- `prefix`: stringView. The prefix for which to search.

Returns:
- `startsWith`: bool. True if the string starts with the specified prefix; otherwise false.

### string.trim

```lua
trimmed = string.trim(str, [characters])
```

Returns a string with all bytes in the specified character set removed from both ends.

Arguments:
- `str`: stringView. The string to trim.
- `characters`: stringView, default " \\r\\n\\t". The set of bytes to remove.

Returns:
- `trimmed`: stringView. The trimmed string.

---
Make an addon with your AI: tell it "Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it."
