// FriendExists returns true if a friend exists with given friendnumber. func (t *Tox) FriendExists(friendnumber int32) (bool, error) { if t.tox == nil { return false, ErrBadTox } //int tox_friend_exists(Tox *tox, int32_t friendnumber); ret := C.tox_friend_exists(t.tox, (C.int32_t)(friendnumber)) return (int(ret) == 1), nil }
// Check if a friend exists. func (tox *Tox) FriendExists(friendNumber uint32) bool { // Create a variable for the friend number. c_friend_number := C.uint32_t(friendNumber) // Return the boolean result. return bool(C.tox_friend_exists(tox.handle, c_friend_number)) }