mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
string(bytes_array) cast
This commit is contained in:
@@ -328,4 +328,6 @@ fn test_bytes_to_string() {
|
||||
buf[4] = `o`
|
||||
assert string(buf) == 'hello'
|
||||
assert string(buf, 2) == 'he'
|
||||
bytes := [`h`, `e`, `l`, `l`, `o`]
|
||||
assert string(bytes) == 'hello'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user