Posted By


eagletmt on 10/11/09

Tagged


Statistics


Viewed 168 times
Favorited by 0 user(s)

localizedCompare


/ Published in: Objective C
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.