summaryrefslogtreecommitdiff
path: root/src/include/mime-utils.h
blob: a8f62c78fd6bef3cfd45f8f2f6bfbdf822175d9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/**
 *  @file  mime.cc
 *  @brief Implementation of main mime parser components
 *  @author Andreas Aardal Hanssen
 *  @date 2002-2005
 */

#ifndef mime_utils_h_included
#define mime_utils_h_included

#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>

inline bool compareStringToQueue(const char *s_in, char *bqueue, int pos, int size)
{
  for (int i = 0; i < size; ++i)
    if (s_in[i] != bqueue[(pos + i) % size]) return false;

  return true;
}

#endif