19 size_t index_of(
const std::vector<std::string>& list,
const char* str) {
20 for (
size_t i = 0; i < list.size(); ++i) {
26 throw std::runtime_error(reason);
30 for (
size_t i = 0; i < list.size(); ++i) {
36 throw std::runtime_error(reason);
39 size_t index_of_icase(
const std::vector<std::string>& list,
const char* str) {
40 for (
size_t i = 0; i < list.size(); ++i) {
44 std::string reason =
"Could not find index_of_icase() ";
46 throw std::runtime_error(reason);
51 for (
size_t i = 0; i < list.size(); ++i) {
55 std::string reason =
"Could not find index_of_icase() ";
57 throw std::runtime_error(reason);
bool equal_icase(const char *a, const char *b)
returns true if a == b without regard for letter case
size_t index_of_icase(const std::vector< std::string > &list, const char *str)
Attempts to find str in the list and return the index using case-insensitive comparisons.
size_t index_of(const std::vector< std::string > &list, const char *str)
Attempts to find str in the list and return the index.
std::basic_string< char, std::char_traits< char >, Allocator< char > > string
string with Manager tracking