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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user