v/vlib/picohttpparser/misc.v

19 lines
357 B
V
Raw Normal View History

2020-01-23 03:26:30 +01:00
module picohttpparser
[inline] [unsafe_fn]
2020-01-23 03:26:30 +01:00
fn cpy(dst, src byteptr, len int) int {
C.memcpy(dst, src, len)
return len
}
[inline]
pub fn cmp(dst, src string) bool {
if dst.len != src.len { return false }
return C.memcmp(dst.str, src.str, src.len) == 0
}
[inline]
pub fn cmpn(dst, src string, n int) bool {
return C.memcmp(dst.str, src.str, n) == 0
}