Skip to content

Commit

Permalink
Remove unused function array_contains() from 'tools' module
Browse files Browse the repository at this point in the history
  • Loading branch information
tsjensen committed Sep 28, 2024
1 parent 0be059f commit ab3bf9f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
16 changes: 0 additions & 16 deletions src/tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,22 +596,6 @@ void analyze_line_ascii(input_t *input_ptr, line_t *line)



int array_contains(char **array, const size_t array_len, const char *s)
{
int result = 0;
if (array != NULL && array_len > 0) {
for (size_t i = 0; i < array_len; ++i) {
if (strcmp(array[i], s) == 0) {
result = 1;
break;
}
}
}
return result;
}



int array_contains0(char **array, const char *s)
{
int result = 0;
Expand Down
3 changes: 0 additions & 3 deletions src/tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,6 @@ size_t count_invisible_chars(const uint32_t *s, size_t *num_esc, char **ascii, s
int is_csi_reset(const uint32_t *csi);


int array_contains(char **array, const size_t array_len, const char *s);


/**
* Determine if the given `array` contains the given string (case-insensitive!).
* @param array an array of strings to search
Expand Down

0 comments on commit ab3bf9f

Please sign in to comment.