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

builtin: vfmt every .v file, except vlib/builtin/int_test.v (#9448)

This commit is contained in:
zakuro
2021-03-25 03:39:59 +09:00
committed by GitHub
parent 5d8b9b0151
commit 6bc9ef7373
19 changed files with 259 additions and 272 deletions

View File

@ -7,8 +7,8 @@ const (
pub fn (_str string) to_wide() &u16 {
$if windows {
unsafe {
num_chars := (C.MultiByteToWideChar(cp_utf8, 0, charptr(_str.str), _str.len, 0,
0))
num_chars := (C.MultiByteToWideChar(cp_utf8, 0, charptr(_str.str), _str.len,
0, 0))
mut wstr := &u16(malloc((num_chars + 1) * 2)) // sizeof(wchar_t)
if wstr != 0 {
C.MultiByteToWideChar(cp_utf8, 0, charptr(_str.str), _str.len, wstr, num_chars)