1 /*
2  * Copyright (C) 2015 Grigori Goronzy <greg@kinoho.net>
3  *
4  * This file is part of libass.
5  *
6  * Permission to use, copy, modify, and distribute this software for any
7  * purpose with or without fee is hereby granted, provided that the above
8  * copyright notice and this permission notice appear in all copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #include <stdlib.h>
20 
21 #ifndef ASS_STRING_H
22 #define ASS_STRING_H
23 
24 int ass_strcasecmp(const char *s1, const char *s2);
25 int ass_strncasecmp(const char *s1, const char *s2, size_t n);
26 
ass_isspace(int c)27 static inline int ass_isspace(int c)
28 {
29     return c == ' ' || c == '\t' || c == '\n' || c == '\v' ||
30            c == '\f' || c == '\r';
31 }
32 
ass_isdigit(int c)33 static inline int ass_isdigit(int c)
34 {
35     return c >= '0' && c <= '9';
36 }
37 
38 #endif
39