refactor: replace utf_convert with utf8proc conversion functions

This commit is contained in:
dundargoc
2024-06-12 21:14:03 +02:00
committed by dundargoc
parent 32e16cb0b6
commit 496091b632
2 changed files with 6 additions and 16 deletions

View File

@@ -32,6 +32,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <utf8proc.h>
#include <uv.h>
#include <wctype.h>
@@ -1346,8 +1347,7 @@ int mb_toupper(int a)
return TOUPPER_LOC(a);
}
// For any other characters use the above mapping table.
return utf_convert(a, toUpper, ARRAY_SIZE(toUpper));
return utf8proc_toupper(a);
}
bool mb_islower(int a)
@@ -1374,8 +1374,7 @@ int mb_tolower(int a)
return TOLOWER_LOC(a);
}
// For any other characters use the above mapping table.
return utf_convert(a, toLower, ARRAY_SIZE(toLower));
return utf8proc_tolower(a);
}
bool mb_isupper(int a)