Exemple #1
0
func (v *Value) StringFormat(format string, a ...interface{}) error {
	str := fmt.Sprintf(format, a...)
	s := C.CString(str)
	defer C.free(unsafe.Pointer(s))
	e := C.unqlite_value_string(v.v, s, C.int(len(str)))
	return code2Error(e)
}
Exemple #2
0
func (v *Value) String(str string) error {
	s := C.CString(str)
	defer C.free(unsafe.Pointer(s))
	e := C.unqlite_value_string(v.v, s, C.int(len(str)))
	return code2Error(e)
}