doc: simplify string mutability section (#6369)
parent
c960b5979e
commit
96b7cce810
|
@ -355,9 +355,7 @@ println(s) // "hello world"
|
||||||
|
|
||||||
In V, a string is a read-only array of bytes. String data is encoded using UTF-8.
|
In V, a string is a read-only array of bytes. String data is encoded using UTF-8.
|
||||||
|
|
||||||
Just like in Go and Java, strings are immutable, which means their values cannot be changed.
|
String values are immutable. The following code will raise an error:
|
||||||
|
|
||||||
The following code will raise an error:
|
|
||||||
|
|
||||||
```v
|
```v
|
||||||
mut s := 'hello'
|
mut s := 'hello'
|
||||||
|
|
Loading…
Reference in New Issue