MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / IsLeadByteACP

Function IsLeadByteACP

source/TextIO.cpp:22–30  ·  view source on GitHub ↗

Benchmarks faster than _ismbblead_l with ACP locale:

Source from the content-addressed store, hash-verified

20
21// Benchmarks faster than _ismbblead_l with ACP locale:
22bool 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

Callers 1

WriteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected