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

#include <string.h>
#include <execline/execline.h>

int el_vardupl (char const *key, char const *s, size_t len)
{
  size_t i = 0 ;
  for (; i < len ; i += strlen(s + i) + 1)
    if (!strcmp(key, s + i)) return 1 ;
  return 0 ;
}