aboutsummaryrefslogtreecommitdiffstats
path: root/libcharconv_bold_fraktur.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcharconv_bold_fraktur.c')
-rw-r--r--libcharconv_bold_fraktur.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/libcharconv_bold_fraktur.c b/libcharconv_bold_fraktur.c
index 50c6004..1245f83 100644
--- a/libcharconv_bold_fraktur.c
+++ b/libcharconv_bold_fraktur.c
@@ -7,16 +7,9 @@ libcharconv_bold_fraktur(const char *s, size_t slen, size_t *n, uint_least32_t *
{
uint_least32_t c;
*n = 0;
- for (; slen--; s++) {
- if ('A' <= *s && *s <= 'Z') {
- c = (uint_least32_t)(UINT32_C(0x1D56C) + (unsigned)(*s - 'A'));
- goto conv;
- } else if ('a' <= *s && *s <= 'z') {
- c = (uint_least32_t)(UINT32_C(0x1D586) + (unsigned)(*s - 'a'));
- goto conv;
- } else {
- *n += 1u;
- }
+ for (; slen--; s++, ++*n) {
+ PLAIN_RANGE('A', 'Z', 0x1D56C);
+ PLAIN_RANGE('a', 'z', 0x1D586);
}
no_conv:
return LIBCHARCONV_NO_CONVERT;