swift - NSNumberFormatter inside a computed Property -


i trying format string number nsnumberformatter. code looks this:

var displayvalue: double? {     {         let = "4.2"         return nsnumberformatter().numberfromstring(i)?.doublevalue     } } 

the property nil, missing?

martin r! right locale issue "4,2" works fine, thanks!


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -