34 if (name->value == value) {
43 if ((name->value & value) == name->value) {
61 const char *c = chars;
63 const size_t size = strcspn(c,
" |");
66 for (en = names; en->
name; en++) {
67 if (strncmp(en->
name, c, size) == 0) {
71 if (en->
alias && strncmp(en->
alias, c, size) == 0) {
76 if (en->
name == NULL) {
77 fprintf(stderr,
"%s: Unknown character sequence: %s\n", __func__, c);
String * nameof(const EnumName *names, int value)
Marshal value, returning a String of OR'ed EnumNames for the given enum value.
Boole * valueof(_Bool value)
MutableString * string(void)
Returns a new MutableString.
void appendCharacters(MutableString *self, const char *chars)
Appends the specified UTF-8 encoded C string.
String * stringWithCharacters(const char *chars)
Returns a new String by copying chars.