| 1019 | } |
| 1020 | |
| 1021 | bool String::equal(const String &str, U32 mode) const |
| 1022 | { |
| 1023 | if( !mode ) |
| 1024 | return ( *this == str ); |
| 1025 | else |
| 1026 | { |
| 1027 | if( _string == str._string ) |
| 1028 | return true; |
| 1029 | else if( _string->isInterned() && str._string->isInterned() ) |
| 1030 | return false; |
| 1031 | else if( length() != str.length() ) |
| 1032 | return false; |
| 1033 | else if( _string->getHashNoCase() != U32_MAX |
| 1034 | && str._string->getHashNoCase() != U32_MAX |
| 1035 | && _string->getHashNoCase() != str._string->getHashNoCase() ) |
| 1036 | return false; |
| 1037 | else |
| 1038 | return ( compare( str.c_str(), length(), mode ) == 0 ); |
| 1039 | } |
| 1040 | } |
| 1041 | |
| 1042 | //----------------------------------------------------------------------------- |
| 1043 | |