summaryrefslogtreecommitdiff
path: root/src/libtipidee/tipidee_method_tonum.c
blob: 7c88e454fff6cbab57e3b175c7c03da57e9cfd02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* ISC license. */

#include <string.h>

#include <tipidee/method.h>

tipidee_method tipidee_method_tonum (char const *s)
{
  tipidee_method_conv const *p = tipidee_method_conv_table ;
  for (; p->str ; p++) if (!strcmp(s, p->str)) break ;
  return p->num ;
}