| 1029 | } |
| 1030 | |
| 1031 | bool String::equal(const String &str, U32 mode) const |
| 1032 | { |
| 1033 | if( !mode ) |
| 1034 | return ( *this == str ); |
| 1035 | else |
| 1036 | { |
| 1037 | if( _string == str._string ) |
| 1038 | return true; |
| 1039 | else if( _string->isInterned() && str._string->isInterned() ) |
| 1040 | return false; |
| 1041 | else if( length() != str.length() ) |
| 1042 | return false; |
| 1043 | else if( _string->getHashNoCase() != U32_MAX |
| 1044 | && str._string->getHashNoCase() != U32_MAX |
| 1045 | && _string->getHashNoCase() != str._string->getHashNoCase() ) |
| 1046 | return false; |
| 1047 | else |
| 1048 | return ( compare( str.c_str(), length(), mode ) == 0 ); |
| 1049 | } |
| 1050 | } |
| 1051 | |
| 1052 | //----------------------------------------------------------------------------- |
| 1053 | |