Add the search feature.

This commit is contained in:
2018-02-10 17:57:24 -08:00
parent a27bdc37f5
commit 1a6a80d26b
2 changed files with 15 additions and 1 deletions

View File

@@ -51,6 +51,13 @@ typedef struct table_entry table_entry;
* @param table the table to initialize.
*/
void table_init(table* table);
/**
* Searches for the given string in the table.
* @param table the table to search.
* @param string the string to search for.
* @return the table entry, or NULL if an entry was not found.
*/
table_entry* table_search(table* table, const char* string);
/**
* Frees the resources allocated by the
* given table.