ios - How to add percent sign in string format? -


this question has answer here:

i want string "99.99%" double,and used format this:

let rate = 99.99999 let str = string(format: "%.2f%", rate) // output 99.99 

and \% not allowed. how add percent sign in string format, please me!

write 2 time %:

rate = 99.99 let str = string(format: "%.2f%%", rate) 

Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -