Rstring supports the following functions:
| Function | Parameters | Description | Notes |
|---|---|---|---|
| append | string, tail | Append 'tail' to string and return new string. | Returned string must be freed with 'free' in caller. |
| free_parts | parts, nparts | Free memory used by array returned from rstring_split. | |
| ltrim | string | Left-trim string in place. | 'string' cannot point to read-only memory. |
| replace | string, target, replacement | Replace all instances of 'target' with 'replacement' in string and return new string. | Returned string must be freed with 'free' in caller. |
| rtrim | string | Right-trim string in place. | 'string' cannot point to read-only memory. |
| split | string, separator, nparts_return | Split string on 'separator' and return array of parts. | Returned array of strings must be freed with 'free_parts' in caller. |
| trim | string | Trim string in place. | 'string' cannot point to read-only memory. |