Skip to content

Commit

Permalink
Revert "feat: remove vowel chech as the char map does itsee #37, #41"
Browse files Browse the repository at this point in the history
This reverts commit e9c527c.
  • Loading branch information
djpiper28 committed Dec 13, 2024
1 parent dddd9cc commit b3d6846
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion mse/card_txt_fields_trie.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,26 @@ 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) {
if (__mse_filter_char(name[i]) != MSE_FILTER_NO_CHAR || __mse_is_vowel(name[i])) {
continue;
}

Expand Down

0 comments on commit b3d6846

Please sign in to comment.