MCPcopy Create free account
hub / github.com/NanoMichael/MicroTeX / ReadBOM

Method ReadBOM

src/xml/tinyxml2.cpp:273–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271// --------- XMLUtil ----------- //
272
273const char* XMLUtil::ReadBOM( const char* p, bool* bom ) {
274 TIXMLASSERT( p );
275 TIXMLASSERT( bom );
276 *bom = false;
277 const unsigned char* pu = reinterpret_cast<const unsigned char*>(p);
278 // Check for BOM:
279 if ( *(pu+0) == TIXML_UTF_LEAD_0
280 && *(pu+1) == TIXML_UTF_LEAD_1
281 && *(pu+2) == TIXML_UTF_LEAD_2 ) {
282 *bom = true;
283 p += 3;
284 }
285 TIXMLASSERT( p );
286 return p;
287}
288
289
290void XMLUtil::ConvertUTF32ToUTF8( unsigned long input, char* output, int* length ) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected