mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
string: make substr() copy the data, like in Java and C#; remove .cstr()
this makes managing memory used by strings much easier V strings are now fully compatible with C strings
This commit is contained in:
@@ -9,7 +9,7 @@ fn test_socket() {
|
||||
// println(socket)
|
||||
|
||||
// message := 'Hello World'
|
||||
// socket.send(message.cstr(), message.len)
|
||||
// socket.send(message.str, message.len)
|
||||
// println('Sent: ' + message)
|
||||
|
||||
// bytes := client.recv(1024)
|
||||
|
||||
Reference in New Issue
Block a user