Skip to content

Commit

Permalink
rawstring/string.split() docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
fubark committed Mar 15, 2023
1 parent 59348d5 commit 9930caa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/hugo/content/docs/toc/data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ print(i + str[i..].findRune(0u'c')) -- "5"
| `runeAt(idx number) number` | Returns the UTF-8 rune at index `idx`. |
| `slice(start number, end number) string` | Returns a slice into this string from `start` to `end` (exclusive) indexes. This is equivalent to using the slice index operator `[start..end]`. |
| `sliceAt(idx number) string` | Returns the UTF-8 rune at index `idx` as a single rune string. |
| `split(delim string) list` | Returns a list of UTF-8 strings split at occurrences of `delim`. |
| `startsWith(prefix string) bool` | Returns whether the string starts with `prefix`. |
| `upper() string` | Returns this string in uppercase. |

Expand Down Expand Up @@ -205,6 +206,7 @@ print str[-1] -- "d"
| `runeAt(idx number) number` | Returns the UTF-8 rune at index `idx`. If the index does not begin a UTF-8 rune, `error(#InvalidRune)` is returned. |
| `slice(start number, end number) rawstring` | Returns a slice into this string from `start` to `end` (exclusive) indexes. This is equivalent to using the slice index operator `[start..end]`. |
| `sliceAt(idx number) string` | Returns the UTF-8 rune at index `idx` as a single rune string. If the index does not begin a UTF-8 rune, `error(#InvalidRune)` is returned. |
| `split(delim string) list` | Returns a list of rawstrings split at occurrences of `delim`. |
| `startsWith(prefix string) bool` | Returns whether the string starts with `prefix`. |
| `toString() string` | Deprecated: Use `utf8()`. |
| `upper() string` | Returns this string in uppercase. |
Expand Down

0 comments on commit 9930caa

Please sign in to comment.