1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vlib: add a new module builtin.wchar, to ease dealing with C APIs that accept wchar_t* (#18794)

This commit is contained in:
Delyan Angelov
2023-07-07 02:40:11 +03:00
committed by GitHub
parent de392003be
commit ded6c38061
5 changed files with 167 additions and 4 deletions

View File

@@ -72,6 +72,7 @@ fn test_string_from_wide2() {
fn test_reverse_cyrillic_with_string_from_wide() {
s := 'Проба'
z := unsafe { string_from_wide(s.to_wide()) }
ws := s.to_wide()
z := unsafe { string_from_wide(ws) }
assert z == s
}