MCPcopy Create free account
hub / github.com/JayXon/Leanify / ReadBOM

Method ReadBOM

lib/tinyxml2/tinyxml2.cpp:289–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

287// --------- XMLUtil ----------- //
288
289const char* XMLUtil::ReadBOM( const char* p, bool* bom )
290{
291 TIXMLASSERT( p );
292 TIXMLASSERT( bom );
293 *bom = false;
294 const unsigned char* pu = reinterpret_cast<const unsigned char*>(p);
295 // Check for BOM:
296 if ( *(pu+0) == TIXML_UTF_LEAD_0
297 && *(pu+1) == TIXML_UTF_LEAD_1
298 && *(pu+2) == TIXML_UTF_LEAD_2 ) {
299 *bom = true;
300 p += 3;
301 }
302 TIXMLASSERT( p );
303 return p;
304}
305
306
307void XMLUtil::ConvertUTF32ToUTF8( unsigned long input, char* output, int* length )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected