summaryrefslogtreecommitdiff
path: root/docs/src
diff options
context:
space:
mode:
authorLeedehai <18319900+Leedehai@users.noreply.github.com>2023-05-19 08:41:58 -0400
committerGitHub <noreply@github.com>2023-05-19 14:41:58 +0200
commit8d4f9304c0539442e0e2273a4e8fa10379178881 (patch)
treec1098ee5bd835df36ccc475852cb95fdc3a6f572 /docs/src
parentf9ab828e2992f795b57fe03ad10d498b315f7e7d (diff)
Update string doc: index can be negative (#1198)
Diffstat (limited to 'docs/src')
-rw-r--r--docs/src/reference/types.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/src/reference/types.md b/docs/src/reference/types.md
index cc30ef1f..a5741337 100644
--- a/docs/src/reference/types.md
+++ b/docs/src/reference/types.md
@@ -219,7 +219,8 @@ Typst provides utility methods for string manipulation. Many of these methods
either a string or a [regular expression]($func/regex). This makes the methods
quite versatile.
-All lengths and indices are expressed in terms of UTF-8 bytes.
+All lengths and indices are expressed in terms of UTF-8 characters. Indices are
+zero-based and negative indices wrap around to the end of the string.
### Example
```example