data_structures
rbt_contains.c
Go to the documentation of this file.
1 /* ************************************************************************** */
3 /* */
4 /* ::: :::::::: */
5 /* rbt_contains.c :+: :+: :+: */
6 /* +:+ +:+ +:+ */
7 /* By: unite <marvin@42.fr> +#+ +:+ +#+ */
8 /* +#+#+#+#+#+ +#+ */
9 /* Created: 2020/07/22 15:53:03 by unite #+# #+# */
10 /* Updated: 2020/07/22 15:53:34 by unite ### ########.fr */
11 /* */
12 /* ************************************************************************** */
13 
14 #include "rbt.h"
15 
16 int rbt_contains(const t_rbt *rbt, const void *key)
17 {
18  return (rbt_get(rbt, key) != NULL);
19 }
rbt_contains
int rbt_contains(const t_rbt *rbt, const void *key)
Does the tree contain the specified key?
Definition: rbt_contains.c:16
s_rbt
A left-leaning red-black binary search tree.
Definition: rbt.h:72
rbt_get
void * rbt_get(const t_rbt *rbt, const void *key)
Returns the value associated with a specified key.
Definition: rbt_get.c:16
rbt.h