Posted By

eagletmt on 10/11/09


Tagged


Versions (?)

localizedCompare


 / Published in: Objective C
 

  1. #import <Foundation/Foundation.h>
  2. #include <assert.h>
  3.  
  4. int main(void)
  5. {
  6. assert([@"hayate" isEqualTo:@"HAYATE"] == false);
  7. assert([@"はやて" isEqualTo:@"ハヤテ"] == false);
  8. assert([@"hayate" localizedCompare:@"HAYATE"] == NSOrderedAscending);
  9. assert([@"はやて" localizedCompare:@"ハヤテ"] == NSOrderedSame);
  10. return 0;
  11. }

Report this snippet  

You need to login to post a comment.