MCPcopy Create free account
hub / github.com/buggins/coolreader / ByteToUnicode

Function ByteToUnicode

crengine/src/lvstring.cpp:2255–2265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2253}
2254
2255lString16 ByteToUnicode( const lString8 & str, const lChar16 * table )
2256{
2257 lString16 buf;
2258 buf.reserve( str.length() );
2259 for ( int i=0; i<(int)str.length(); i++ ) {
2260 int ch = (unsigned char)str[i];
2261 lChar16 ch16 = ((ch & 0x80) && table) ? table[ (ch&0x7F) ] : ch;
2262 buf += ch16;
2263 }
2264 return buf;
2265}
2266
2267
2268#if !defined(__SYMBIAN32__) && defined(_WIN32)

Callers 2

ReadContentsMethod · 0.85
decodeStringMethod · 0.85

Calls 2

reserveMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected