forked from solstice/solstice
23 lines
443 B
Markdown
23 lines
443 B
Markdown
|
|
# string_Reverse
|
||
|
|
Get the reversed version of a string.
|
||
|
|
|
||
|
|
## Arguments
|
||
|
|
- str (string): the string to reverse.
|
||
|
|
|
||
|
|
## Returns
|
||
|
|
result (string): the reversed string.
|
||
|
|
|
||
|
|
## Raises
|
||
|
|
- `AllocFail`: raised if Ground failed to allocate memory for the new string.
|
||
|
|
|
||
|
|
## Example
|
||
|
|
### Ground
|
||
|
|
```python
|
||
|
|
call !string_Reverse "Hello, World!" &reverse
|
||
|
|
println $reverse # "!dlroW, olleH"
|
||
|
|
```
|
||
|
|
|
||
|
|
### Solstice
|
||
|
|
```c
|
||
|
|
puts string_Reverse("Hello, World!") // "!dlroW, olleH"
|
||
|
|
```
|