izmjene licence
[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 int OS_StrStartsWith(const char *str, const char *pattern) {
14     while(*pattern)
15     {
16         if(*pattern++ != *str++)
17             return FALSE;
18     }
19
20    return TRUE;
21 }