blob: 2e75cc764f40a1fa7a10f7c4c25d8fd2d03922bd [file] [log] [blame] [raw]
/*
Copyright 2015-2021 Rivoreo
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#include <sys/types.h>
#include <bash/config.h>
#include <bash/command.h>
#include <string.h>
int is_in_list_ignore_case(const struct word_list *list, const char *s) {
while(list) {
if(strcasecmp(list->word->word, s) == 0) return 1;
list = list->next;
}
return 0;
}