int ON__ClassIdDumpNode::CompareClassName( const class ON__ClassIdDumpNode& other ) const { int rc = 0; const ON_ClassId* a = m_class_id; const ON_ClassId* b = other.m_class_id; if ( a != b ) { if ( 0 == a ) { rc = -1; } else if ( 0 == b ) rc = 1; else { const char* a_name = a->ClassName(); const char* b_name = b->ClassName(); if ( 0 == a_name ) { if ( 0 == b_name ) { rc = b->Mark() - a->Mark(); if ( 0 == rc ) rc = ON_UuidCompare(a->Uuid(),b->Uuid()); } else rc = -1; } else if ( 0 == b_name ) { rc = 1; } else { rc = on_stricmp(a_name,b_name); if ( 0 == rc ) { rc = strcmp(a_name,b_name); if ( 0 == rc ) { rc = b->Mark() - a->Mark(); if ( 0 == rc ) rc = ON_UuidCompare(a->Uuid(),b->Uuid()); } } } } } return rc; }
int ON_String::CompareNoCase( const char* s) const { int rc = 0; if ( s && s[0] ) { if ( IsEmpty() ) { rc = -1; } else { rc = on_stricmp( m_s, s ); } } else { rc = IsEmpty() ? 0 : 1; } return rc; }
int ON_wString::CompareNoCase( const char* s) const { int rc = 0; if ( s && s[0] ) { if ( IsEmpty() ) { rc = -1; } else { int c_count = w2c_size( Length(m_s), m_s ); char* c = (char*)onmalloc((c_count+1)*sizeof(*c)); w2c( Length(m_s), m_s, c_count, c ); c[c_count] = 0; rc = on_stricmp( c, s ); onfree(c); } } else { rc = IsEmpty() ? 0 : 1; } return rc; }