首页>>iPhone >>开发
NSString int 互转
楼:1
九品仙
2011-8-22 20:07:00
NSString int 互转

Convert NSString to int

 
1 NSString *aNumberString =@"123";
2 int i = [aNumberStringintValue];

 

Convert int to NSString

 
1 int aNumber = 123;
2 NSString *aString =[NSStringstringWithFormat:@"%d",aNumber];