* @brief Return true if chars match * * Caller must not call this for lead bytes */
| 754 | * Caller must not call this for lead bytes |
| 755 | */ |
| 756 | static inline bool |
| 757 | matchchar(const tchar_t *ch1, const tchar_t *ch2, size_t len, bool casitive) |
| 758 | { |
| 759 | if (casitive) |
| 760 | return memcmp(ch1, ch2, len * sizeof(tchar_t)) == 0; |
| 761 | for (size_t i = 0; i < len; ++i) |
| 762 | { |
| 763 | if (tc::totlower(ch1[i]) != tc::totlower(ch2[i])) |
| 764 | return false; |
| 765 | } |
| 766 | return true; |
| 767 | } |
| 768 | |
| 769 | |
| 770 | /** Does character introduce a multicharacter character? */ |