MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / ReadBOM

Method ReadBOM

3rdparty/tinyxml2/tinyxml2.cpp:399–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397
398
399const char* XMLUtil::ReadBOM( const char* p, bool* bom )
400{
401 TIXMLASSERT( p );
402 TIXMLASSERT( bom );
403 *bom = false;
404 const unsigned char* pu = reinterpret_cast<const unsigned char*>(p);
405 // Check for BOM:
406 if ( *(pu+0) == TIXML_UTF_LEAD_0
407 && *(pu+1) == TIXML_UTF_LEAD_1
408 && *(pu+2) == TIXML_UTF_LEAD_2 ) {
409 *bom = true;
410 p += 3;
411 }
412 TIXMLASSERT( p );
413 return p;
414}
415
416
417void XMLUtil::ConvertUTF32ToUTF8( unsigned long input, char* output, int* length )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected