Benchmarks faster than _ismbblead_l with ACP locale:
| 20 | |
| 21 | // Benchmarks faster than _ismbblead_l with ACP locale: |
| 22 | bool IsLeadByteACP(BYTE b) |
| 23 | { |
| 24 | // Benchmarks slightly faster without this check, even when MaxCharSize == 1: |
| 25 | //if (g_ACPInfo.MaxCharSize > 1) |
| 26 | for (int i = 0; i < _countof(g_ACPInfo.LeadByte) && g_ACPInfo.LeadByte[i]; i += 2) |
| 27 | if (b >= g_ACPInfo.LeadByte[i] && b <= g_ACPInfo.LeadByte[i+1]) |
| 28 | return true; |
| 29 | return false; |
| 30 | } |
| 31 | |
| 32 | #endif |
| 33 |