| 532 | |
| 533 | |
| 534 | bool TiXmlBase::StringEqual( const char* p, |
| 535 | const char* tag, |
| 536 | bool ignoreCase, |
| 537 | TiXmlEncoding encoding ) |
| 538 | { |
| 539 | assert( p ); |
| 540 | assert( tag ); |
| 541 | if ( !p || !*p ) |
| 542 | { |
| 543 | assert( 0 ); |
| 544 | return false; |
| 545 | } |
| 546 | |
| 547 | const char* q = p; |
| 548 | |
| 549 | if ( ignoreCase ) |
| 550 | { |
| 551 | while ( *q && *tag && ToLower( *q, encoding ) == ToLower( *tag, encoding ) ) |
| 552 | { |
| 553 | ++q; |
| 554 | ++tag; |
| 555 | } |
| 556 | |
| 557 | if ( *tag == 0 ) |
| 558 | return true; |
| 559 | } |
| 560 | else |
| 561 | { |
| 562 | while ( *q && *tag && *q == *tag ) |
| 563 | { |
| 564 | ++q; |
| 565 | ++tag; |
| 566 | } |
| 567 | |
| 568 | if ( *tag == 0 ) // Have we found the end of the tag, and everything equal? |
| 569 | return true; |
| 570 | } |
| 571 | return false; |
| 572 | } |
| 573 | |
| 574 | const char* TiXmlBase::ReadText( const char* p, |
| 575 | TIXML_STRING * text, |
nothing calls this directly
no outgoing calls
no test coverage detected