From c5bb40f5d6fb8a298bfe671b39c0c348df0a0062 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Sat, 20 Jul 2024 20:47:25 +0300 Subject: [PATCH] Update 14-slices.mdx Two wordings are improved. --- .../version-0.12/01-language-basics/14-slices.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/versioned_docs/version-0.12/01-language-basics/14-slices.mdx b/website/versioned_docs/version-0.12/01-language-basics/14-slices.mdx index 063b81e..82297da 100644 --- a/website/versioned_docs/version-0.12/01-language-basics/14-slices.mdx +++ b/website/versioned_docs/version-0.12/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