Skip to content

Commit

Permalink
feat: remove vowel chech as the char map does itsee #37, #41
Browse files Browse the repository at this point in the history
  • Loading branch information
djpiper28 committed Dec 13, 2024
1 parent 29b79be commit e9c527c
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions mse/card_txt_fields_trie.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,26 +243,12 @@ static int __mse_insert_to_name_parts(mse_card_name_parts_t *ret, char * restric
return 1;
}

static int __mse_is_vowel(char c)
{
switch(tolower(c)) {
case 'a':
case 'e':
case 'i':
case 'o':
case 'u':
return 1;
default:
return 0;
}
}

static int __mse_split_card_name(char * restrict name, mse_card_name_parts_t * restrict ret)
{
char *tmp = name;
size_t len = strlen(name);
for (size_t i = 0; i <= len; i++) {
if (__mse_filter_char(name[i]) != MSE_FILTER_NO_CHAR || __mse_is_vowel(name[i])) {
if (__mse_filter_char(name[i]) != MSE_FILTER_NO_CHAR) {
continue;
}

Expand Down

0 comments on commit e9c527c

Please sign in to comment.