descriptionWithLocale:
ローカライズして返します
-(NSString *)descriptionWithLocale:(NSDictionary *)aLocale:
解説
レシーバの値を示す文字列を返します。aLocaleで書式を設定します。
書式を設定したくない場合はnilをセットします。
返り値
( NSString * )
レシーバの内容
引数
( NSDictionary * )aLocale
フレームワーク
Foundation
クラス
NSNumber
Instance Methods
使用可能
10.0
参照
- stringValue
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys: @"%i",@"int", @"%0.1g",@"float", @"%i",@"char", nil]; NSNumber *num1 = [NSNumber numberWithFloat:233.3333333]; NSLog(@"%@",[num1 descriptionWithLocale:dict]); NSNumber *num2 = [NSNumber numberWithInt:123]; NSLog(@"%@",[num2 descriptionWithLocale:dict]); } @end