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

#include <skalibs/bytestr.h>
#include <execline/execline.h>

int el_vardupl (char const *key, char const *s, unsigned int len)
{
  register unsigned int i = 0 ;
  for (; i < len ; i += str_len(s + i) + 1)
    if (!str_diff(key, s + i)) return 1 ;
  return 0 ;
}