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

replace ugly tos2(bytes) with string(bytes)

This commit is contained in:
Alexander Medvednikov
2019-06-27 12:27:46 +02:00
parent fda7caef93
commit 90c0791345
11 changed files with 30 additions and 39 deletions

View File

@@ -255,10 +255,7 @@ pub fn key_pressed(wnd voidptr, key int) bool {
// TODO not mut
pub fn (w mut Window) get_clipboard_text() string {
return tos2(C.glfwGetClipboardString(w.data))
// # char *c = glfwGetClipboardString(w->data);
// # return tos_no_len(c);
// return ''
return string(byteptr(C.glfwGetClipboardString(w.data)))
}
pub fn (w &Window) set_clipboard_text(s string) {