diff --git a/website/versioned_docs/version-0.13/01-language-basics/14-slices.mdx b/website/versioned_docs/version-0.13/01-language-basics/14-slices.mdx index b40f90d..077486e 100644 --- a/website/versioned_docs/version-0.13/01-language-basics/14-slices.mdx +++ b/website/versioned_docs/version-0.13/01-language-basics/14-slices.mdx @@ -9,7 +9,7 @@ Slices can be thought of as a pair of `[*]T` (the pointer to the data) and a `usize` (the element count). Their syntax is `[]T`, with `T` being the child type. Slices are used heavily throughout Zig for when you need to operate on arbitrary amounts of data. Slices have the same attributes as pointers, meaning -that there also exists const slices. For loops also operate over slices. String +that const slices also exist. `for` loops also operate over slices. String literals in Zig coerce to `[]const u8`. Here, the syntax `x[n..m]` is used to create a slice from an array. This is diff --git a/website/versioned_docs/version-0.14/01-language-basics/14-slices.mdx b/website/versioned_docs/version-0.14/01-language-basics/14-slices.mdx index b40f90d..077486e 100644 --- a/website/versioned_docs/version-0.14/01-language-basics/14-slices.mdx +++ b/website/versioned_docs/version-0.14/01-language-basics/14-slices.mdx @@ -9,7 +9,7 @@ Slices can be thought of as a pair of `[*]T` (the pointer to the data) and a `usize` (the element count). Their syntax is `[]T`, with `T` being the child type. Slices are used heavily throughout Zig for when you need to operate on arbitrary amounts of data. Slices have the same attributes as pointers, meaning -that there also exists const slices. For loops also operate over slices. String +that const slices also exist. `for` loops also operate over slices. String literals in Zig coerce to `[]const u8`. Here, the syntax `x[n..m]` is used to create a slice from an array. This is