Decimal point in calculations as . or ,

前端 未结 4 925
余生分开走
余生分开走 2021-01-23 01:48

If I use decimal pad for input of numbers the decimal changes depending of country and region format.
May be as a point \".\" or as a comma \",\"
And I do not have contr

4条回答
  •  粉色の甜心
    2021-01-23 02:33

    You can use also the class method of NSNumberFormatter

    NSString* formattedString = [NSNumberFormatter 
                                     localizedStringFromNumber:number
                                     numberStyle:NSNumberFormatterCurrencyStyle];
    

提交回复
热议问题