new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / os_regex / os_regex_startswith.c
1 /* Copyright (C) 2014 Trend Micro Inc.
2  * All right reserved.
3  *
4  * This program is a free software; you can redistribute it
5  * and/or modify it under the terms of the GNU General Public
6  * License (version 2) as published by the FSF - Free Software
7  * Foundation
8  */
9
10 #include "os_regex.h"
11 #include "os_regex_internal.h"
12
13
14 int OS_StrStartsWith(const char *str, const char *pattern)
15 {
16     while (*pattern) {
17         if (*pattern++ != *str++) {
18             return FALSE;
19         }
20     }
21
22     return TRUE;
23 }