summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2023-10-26 16:06:44 +0800
committerGitHub <noreply@github.com>2023-10-26 10:06:44 +0200
commitcef5e57eb59f0ef2633c298aa2c8a5b049b32d5c (patch)
tree7f2f801ce7defee2c1aab0c5ec210347e7c778f9 /doc
parent7c3917d1dd3faa12fa1cc079d6fcf22f3da630c5 (diff)
downloadNim-cef5e57eb59f0ef2633c298aa2c8a5b049b32d5c.tar.gz
fixes #22867; fixes cstring modification example on Nim Manual (#22871)
fixes #22867
Diffstat (limited to 'doc')
-rw-r--r--doc/manual.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/manual.md b/doc/manual.md
index 8f419705e..0e447fd12 100644
--- a/doc/manual.md
+++ b/doc/manual.md
@@ -1495,7 +1495,8 @@ it can be modified:
 
   ```nim
   var x = "123456"
-  var s: cstring = x
+  prepareMutation(x) # call `prepareMutation` before modifying the strings
+  var s: cstring = cstring(x)
   s[0] = 'u' # This is ok
   ```