2017-04-14 19:02:05 +02:00
|
|
|
#ifndef HEADER_CURL_STRCASE_H
|
|
|
|
#define HEADER_CURL_STRCASE_H
|
2008-10-12 18:41:06 +02:00
|
|
|
/***************************************************************************
|
|
|
|
* _ _ ____ _
|
|
|
|
* Project ___| | | | _ \| |
|
|
|
|
* / __| | | | |_) | |
|
|
|
|
* | (__| |_| | _ <| |___
|
|
|
|
* \___|\___/|_| \_\_____|
|
|
|
|
*
|
2023-07-02 19:51:09 +02:00
|
|
|
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2008-10-12 18:41:06 +02:00
|
|
|
*
|
|
|
|
* This software is licensed as described in the file COPYING, which
|
|
|
|
* you should have received as part of this distribution. The terms
|
2021-09-14 00:13:48 +02:00
|
|
|
* are also available at https://curl.se/docs/copyright.html.
|
2008-10-12 18:41:06 +02:00
|
|
|
*
|
|
|
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
* copies of the Software, and permit persons to whom the Software is
|
|
|
|
* furnished to do so, under the terms of the COPYING file.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
2022-11-16 20:14:03 +01:00
|
|
|
* SPDX-License-Identifier: curl
|
|
|
|
*
|
2008-10-12 18:41:06 +02:00
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#include <curl/curl.h>
|
|
|
|
|
2015-04-27 22:25:09 +02:00
|
|
|
/*
|
2017-04-14 19:02:05 +02:00
|
|
|
* Only "raw" case insensitive strings. This is meant to be locale independent
|
|
|
|
* and only compare strings we know are safe for this.
|
2015-04-27 22:25:09 +02:00
|
|
|
*
|
2022-08-04 22:12:04 +02:00
|
|
|
* The function is capable of comparing a-z case insensitively.
|
|
|
|
*
|
|
|
|
* Result is 1 if text matches and 0 if not.
|
2015-04-27 22:25:09 +02:00
|
|
|
*/
|
2017-04-14 19:02:05 +02:00
|
|
|
|
2023-05-23 16:38:00 +02:00
|
|
|
#define strcasecompare(a,b) curl_strequal(a,b)
|
|
|
|
#define strncasecompare(a,b,c) curl_strnequal(a,b,c)
|
2015-04-27 22:25:09 +02:00
|
|
|
|
|
|
|
char Curl_raw_toupper(char in);
|
2022-11-16 20:14:03 +01:00
|
|
|
char Curl_raw_tolower(char in);
|
2008-10-12 18:41:06 +02:00
|
|
|
|
|
|
|
/* checkprefix() is a shorter version of the above, used when the first
|
2022-08-04 22:12:04 +02:00
|
|
|
argument is the string literal */
|
|
|
|
#define checkprefix(a,b) curl_strnequal(b, STRCONST(a))
|
2015-04-27 22:25:09 +02:00
|
|
|
|
|
|
|
void Curl_strntoupper(char *dest, const char *src, size_t n);
|
2020-08-30 11:54:41 +02:00
|
|
|
void Curl_strntolower(char *dest, const char *src, size_t n);
|
2008-10-12 18:41:06 +02:00
|
|
|
|
2022-08-04 22:12:04 +02:00
|
|
|
bool Curl_safecmp(char *a, char *b);
|
2022-11-16 20:14:03 +01:00
|
|
|
int Curl_timestrcmp(const char *first, const char *second);
|
2022-08-04 22:12:04 +02:00
|
|
|
|
2017-04-14 19:02:05 +02:00
|
|
|
#endif /* HEADER_CURL_STRCASE_H */
|