1 The `ffi.fill()` function fills memory with a byte value. 2 3 Fill buffer with a byte value. 4 5 -- Testcase -- 6 {% 7 import * as ffi from 'ffi'; 8 9 let buf = ffi.ctype('char[10]'); 10 ffi.fill(buf.ptr(), 10, 0x41); // Fill with 'A' 11 12 print("filled: ", ffi.string(buf.ptr(), 10), "\n"); 13 -- End -- 14 15 -- Expect stdout -- 16 filled: AAAAAAAAAA 17 -- End -- 18
This page was automatically generated by LXR 0.3.1. • OpenWrt