¡@

Home 

2014/10/15 ¤U¤È 10:12:23

iphone Programming Glossary: otherstring

unichar and NSString - how interchangeable are these?

http://stackoverflow.com/questions/1354388/unichar-and-nsstring-how-interchangeable-are-these

unichar value NSString str NSString stringWithFormat @ C value return str @end Then call it with NSString otherString @ TestString NSString str NSString stringWithUnichar otherString characterAtIndex 1 or you could just directly go like this.. @ C value return str @end Then call it with NSString otherString @ TestString NSString str NSString stringWithUnichar otherString characterAtIndex 1 or you could just directly go like this NSString str NSString stringWithFormat @ C otherString characterAtIndex.. otherString characterAtIndex 1 or you could just directly go like this NSString str NSString stringWithFormat @ C otherString characterAtIndex 1 Choose the category if you want to use it repeatedly or if you only have to do it once use the stringWithFormat..

How to let the sortedArrayUsingSelector using integer to sort instead of String?

http://stackoverflow.com/questions/2752992/how-to-let-the-sortedarrayusingselector-using-integer-to-sort-instead-of-string

@selector psuedoNumericCompare @interface NSString Support NSComparisonResult psuedoNumericCompare NSString otherString @end @implementation NSString Support psuedo numeric comparison if both strings begin with digits numeric comparison on.. numbers equal or non numeric caseInsensitiveCompare on the remainder NSComparisonResult psuedoNumericCompare NSString otherString NSString left self NSString right otherString NSInteger leftNumber rightNumber NSScanner leftScanner NSScanner scannerWithString.. on the remainder NSComparisonResult psuedoNumericCompare NSString otherString NSString left self NSString right otherString NSInteger leftNumber rightNumber NSScanner leftScanner NSScanner scannerWithString left NSScanner rightScanner NSScanner..