]> git.ipfire.org Git - thirdparty/squid.git/blob - src/StrList.h
Source Format Enforcement (#532)
[thirdparty/squid.git] / src / StrList.h
1 /*
2 * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 /* DEBUG: section 66 HTTP Header Tools */
10
11 #ifndef SQUID_STRLIST_H_
12 #define SQUID_STRLIST_H_
13
14 #include "sbuf/forward.h"
15
16 class String;
17
18 void strListAdd(String * str, const char *item, char del);
19 int strListIsMember(const String * str, const SBuf &item, char del);
20 int strListIsSubstr(const String * list, const char *s, char del);
21 int strListGetItem(const String * str, char del, const char **item, int *ilen, const char **pos);
22 /// Searches for the first matching key=value pair
23 /// within a delimiter-separated list of items.
24 /// \returns the value of the found pair or an empty string.
25 SBuf getListMember(const String &list, const char *key, const char delimiter);
26
27 #endif /* SQUID_STRLIST_H_ */
28