From 517fed85a14a598dca2d0543395cd8e82438debe Mon Sep 17 00:00:00 2001 From: Davide Beatrici Date: Thu, 2 Aug 2018 18:14:57 +0200 Subject: [PATCH] Str: remove unused IsStrInStrTokenList() function --- src/Mayaqua/Str.c | 39 --------------------------------------- src/Mayaqua/Str.h | 1 - 2 files changed, 40 deletions(-) diff --git a/src/Mayaqua/Str.c b/src/Mayaqua/Str.c index 5d386755..b863f9d3 100644 --- a/src/Mayaqua/Str.c +++ b/src/Mayaqua/Str.c @@ -579,45 +579,6 @@ bool InStrList(char *target_str, char *tokens, char *splitter, bool case_sensiti return ret; } -// Confirm whether the specified string is in the token list -bool IsStrInStrTokenList(char *str_list, char *str, char *split_chars, bool case_sensitive) -{ - TOKEN_LIST *t; - bool ret = false; - UINT i; - // Validate arguments - if (str_list == NULL || str == NULL) - { - return false; - } - - t = ParseTokenWithoutNullStr(str_list, split_chars); - - if (t != NULL) - { - for (i = 0;i < t->NumTokens;i++) - { - if ((case_sensitive == false) && (StrCmpi(t->Token[i], str) == 0)) - { - ret = true; - } - if ((case_sensitive) && (StrCmp(t->Token[i], str) == 0)) - { - ret = true; - } - - if (ret) - { - break; - } - } - - FreeToken(t); - } - - return ret; -} - // Cut out the token from string (Ignore blanks between delimiters) TOKEN_LIST *ParseTokenWithoutNullStr(char *str, char *split_chars) { diff --git a/src/Mayaqua/Str.h b/src/Mayaqua/Str.h index 92da8dc8..2eec8e04 100644 --- a/src/Mayaqua/Str.h +++ b/src/Mayaqua/Str.h @@ -244,7 +244,6 @@ void ToHex64(char *str, UINT64 value); UINT HexToInt(char *str); UINT64 HexToInt64(char *str); UINT SearchAsciiInBinary(void *data, UINT size, char *str, bool case_sensitive); -bool IsStrInStrTokenList(char *str_list, char *str, char *split_chars, bool case_sensitive); void IntListToStr(char *str, UINT str_size, LIST *o, char *separate_str); LIST *StrToIntList(char *str, bool sorted); void NormalizeIntListStr(char *dst, UINT dst_size, char *src, bool sorted, char *separate_str);