Files
highground-fork/string/docs/modify/trim_right.md

23 lines
483 B
Markdown

# string_TrimRight
Trim whitespace from the right side of a string.
## Arguments
- str (string): the string to trim.
## Returns
trimmed (string): the string with the whitespace removed on the right side.
## Raises
- `AllocFail`: raised if Ground failed to allocate memory for the new string.
## Example
### Ground
```python
call !string_TrimRight " aaabbb " &trimmed
println $trimmed # " aaabbb"
```
### Solstice
```c
puts string_TrimRight(" aaabbb ") // " aaabbb"
```