mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Improve String_contains_i to allow for multiple terms
This enables: * Multiple filters in the main panel and strace etc. views * Multiple search terms The search terms are separated by "|" and are still fixed strings matched case-insensitive. Added a multi flag at request of BenBE.
This commit is contained in:
2
XUtils.h
2
XUtils.h
@ -40,7 +40,7 @@ static inline bool String_startsWith(const char* s, const char* match) {
|
||||
return strncmp(s, match, strlen(match)) == 0;
|
||||
}
|
||||
|
||||
bool String_contains_i(const char* s1, const char* s2);
|
||||
bool String_contains_i(const char* s1, const char* s2, bool multi);
|
||||
|
||||
static inline bool String_eq(const char* s1, const char* s2) {
|
||||
return strcmp(s1, s2) == 0;
|
||||
|
Reference in New Issue
Block a user