47 for (
size_t i = 0; map[i].
name; i++)
48 if (map[i].value == val)
64 if (!name || (len == 0) || !map)
67 for (
size_t i = 0; map[i].
name; i++)
int mutt_map_get_value_n(const char *name, size_t len, const struct Mapping *map)
Lookup the constant for a string.
int mutt_map_get_value(const char *name, const struct Mapping *map)
Lookup the constant for a string.
const char * mutt_map_get_name(int val, const struct Mapping *map)
Lookup a string for a constant.
Store links between a user-readable string and a constant.
size_t mutt_str_len(const char *a)
Calculate the length of a string, safely.
bool mutt_istrn_equal(const char *a, const char *b, size_t num)
Check for equality of two strings ignoring case (to a maximum), safely.
String manipulation functions.
Mapping between user-readable string and a constant.
const char * name
String value.