00001 #ifndef HEADER_CURL_STRCASE_H 00002 #define HEADER_CURL_STRCASE_H 00003 /*************************************************************************** 00004 * _ _ ____ _ 00005 * Project ___| | | | _ \| | 00006 * / __| | | | |_) | | 00007 * | (__| |_| | _ <| |___ 00008 * \___|\___/|_| \_\_____| 00009 * 00010 * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. 00011 * 00012 * This software is licensed as described in the file COPYING, which 00013 * you should have received as part of this distribution. The terms 00014 * are also available at https://curl.haxx.se/docs/copyright.html. 00015 * 00016 * You may opt to use, copy, modify, merge, publish, distribute and/or sell 00017 * copies of the Software, and permit persons to whom the Software is 00018 * furnished to do so, under the terms of the COPYING file. 00019 * 00020 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 00021 * KIND, either express or implied. 00022 * 00023 ***************************************************************************/ 00024 00025 #include <curl/curl.h> 00026 00027 /* 00028 * Only "raw" case insensitive strings. This is meant to be locale independent 00029 * and only compare strings we know are safe for this. 00030 * 00031 * The function is capable of comparing a-z case insensitively even for 00032 * non-ascii. 00033 */ 00034 00035 #define strcasecompare(a,b) Curl_strcasecompare(a,b) 00036 #define strncasecompare(a,b,c) Curl_strncasecompare(a,b,c) 00037 00038 int Curl_strcasecompare(const char *first, const char *second); 00039 int Curl_safe_strcasecompare(const char *first, const char *second); 00040 int Curl_strncasecompare(const char *first, const char *second, size_t max); 00041 00042 char Curl_raw_toupper(char in); 00043 00044 /* checkprefix() is a shorter version of the above, used when the first 00045 argument is zero-byte terminated */ 00046 #define checkprefix(a,b) curl_strnequal(a,b,strlen(a)) 00047 00048 void Curl_strntoupper(char *dest, const char *src, size_t n); 00049 char Curl_raw_toupper(char in); 00050 00051 #endif /* HEADER_CURL_STRCASE_H */