MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / UnicodeCodePoint

Function UnicodeCodePoint

scintilla/lexlib/StyleContext.h:22–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22inline int UnicodeCodePoint(const unsigned char *us) {
23 if (us[0] < 0xC2) {
24 return us[0];
25 } else if (us[0] < 0xE0) {
26 return ((us[0] & 0x1F) << 6) + (us[1] & 0x3F);
27 } else if (us[0] < 0xF0) {
28 return ((us[0] & 0xF) << 12) + ((us[1] & 0x3F) << 6) + (us[2] & 0x3F);
29 } else if (us[0] < 0xF5) {
30 return ((us[0] & 0x7) << 18) + ((us[1] & 0x3F) << 12) + ((us[2] & 0x3F) << 6) + (us[3] & 0x3F);
31 }
32 return us[0];
33}
34
35inline int BytesInUnicodeCodePoint(int codePoint) {
36 if (codePoint < 0x80)

Callers 1

GetNextCharMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected