summaryrefslogtreecommitdiff
path: root/bittorrent/mbtstr/src/contains.c
blob: b1bcafc489fcf03e5457952552158412231be525 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <complex.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>

#include "mbtstr/view.h"

bool mbt_cview_contains(struct mbt_cview view, char c)
{
    for (size_t i = 0; i < view.size; i++)
    {
        if (view.data[i] == c)
            return true;
    }
    return false;
}