doc: add about immediate reallocation in slicing by call .clone()

pull/13567/head
metif12@gmail.com 2022-02-22 15:02:56 +03:30
parent 41bdf3b6c5
commit d5aff27566
1 changed files with 1 additions and 1 deletions

View File

@ -1145,7 +1145,7 @@ println(a) // `[2, 2, 2, 13, 2, 3, 4]`
println(b) // `[2, 3, 13]`
```
for immidaite realoocation and become independent you can call `.clone()` after slice brackets:
for immidaite reallocation and become independent you can call `.clone()` after slice brackets:
```v
mut a := [0, 1, 2, 3, 4, 5]
mut b := a[2..4].colne()