diff options
Diffstat (limited to 'libcharconv_bold_script.c')
| -rw-r--r-- | libcharconv_bold_script.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/libcharconv_bold_script.c b/libcharconv_bold_script.c index d3a5c7a..f037275 100644 --- a/libcharconv_bold_script.c +++ b/libcharconv_bold_script.c @@ -7,16 +7,9 @@ libcharconv_bold_script(const char *s, size_t slen, size_t *n, uint_least32_t *c { uint_least32_t c; *n = 0; - for (; slen--; s++) { - if ('A' <= *s && *s <= 'Z') { - c = (uint_least32_t)(UINT32_C(0x1D4D0) + (unsigned)(*s - 'A')); - goto conv; - } else if ('a' <= *s && *s <= 'z') { - c = (uint_least32_t)(UINT32_C(0x1D4EA) + (unsigned)(*s - 'a')); - goto conv; - } else { - *n += 1u; - } + for (; slen--; s++, ++*n) { + PLAIN_RANGE('A', 'Z', 0x1D4D0); + PLAIN_RANGE('a', 'z', 0x1D4EA); } no_conv: return LIBCHARCONV_NO_CONVERT; |
