示例#1
0
文件: judy1.go 项目: bickfordb/judy
func (j *Judy1) Test(index uint64) (exists bool) {
	st := C.Judy1Test(C.Pcvoid_t(j.val), C.Word_t(index), nil)
	if st != 0 {
		exists = true
	}
	return
}
示例#2
0
文件: judy1.go 项目: riobard/go-judy
// Test if index's bit is set in the Judy1 array.
// Return true if index's bit is set (index is present), false if it is unset (index is absent).
func (j *Judy1) Test(index uint64) bool {
	return C.Judy1Test(C.Pcvoid_t(j.array), C.Word_t(index), nil) != 0
}