Пример #1
0
int UT_Compare( const UT_String& rhs, const UT_String& lhs )
{
#if defined(TARGET_IOS) || defined(TARGET_MACOS)
  CFStringRef	theString1 = CFStringCreateWithCharactersNoCopy( 0, rhs.data(), rhs.length(), kCFAllocatorNull );
  CFStringRef	theString2 = CFStringCreateWithCharactersNoCopy( 0, lhs.data(), lhs.length(), kCFAllocatorNull );
  CFComparisonResult	result = CFStringCompare( theString1, theString2, kCFCompareLocalized );
  CFRelease( theString1 );
  CFRelease( theString2 );
  return result;
#else
   return rhs.compare(lhs);
#endif
}