| 146 | static unsigned char *sUtf8LenArray = 0; |
| 147 | |
| 148 | static const unsigned char *getUtf8LenArray() |
| 149 | { |
| 150 | if (!sUtf8LenArray) |
| 151 | { |
| 152 | sUtf8LenArray = (unsigned char *)malloc(256); |
| 153 | for(int i=0;i<256;i++) |
| 154 | sUtf8LenArray[i] = i< 0x80 ? 1 : i<0xe0 ? 2 : i<0xf0 ? 3 : 4; |
| 155 | } |
| 156 | return sUtf8LenArray; |
| 157 | } |
| 158 | |
| 159 | static inline int DecodeAdvanceUTF8(const unsigned char * &ioPtr) |
| 160 | { |
no outgoing calls
no test coverage detected