forked from solstice/solstice
23 lines
476 B
Markdown
23 lines
476 B
Markdown
|
|
# string_TrimLeft
|
||
|
|
Trim whitespace from the left side of a string.
|
||
|
|
|
||
|
|
## Arguments
|
||
|
|
- str (string): the string to trim.
|
||
|
|
|
||
|
|
## Returns
|
||
|
|
trimmed (string): the string with the whitespace removed on the left side.
|
||
|
|
|
||
|
|
## Raises
|
||
|
|
- `AllocFail`: raised if Ground failed to allocate memory for the new string.
|
||
|
|
|
||
|
|
## Example
|
||
|
|
### Ground
|
||
|
|
```python
|
||
|
|
call !string_TrimLeft " aaabbb " &trimmed
|
||
|
|
println $trimmed # "aaabbb "
|
||
|
|
```
|
||
|
|
|
||
|
|
### Solstice
|
||
|
|
```c
|
||
|
|
puts string_TrimLeft(" aaabbb ") // "aaabbb "
|
||
|
|
```
|