c++ - Qt - custom decimal point and thousand separator -


how can convert number (double) string, custom decimal point , thousand separator chars?

i've seen qlocale, don't want choose localization country, rather specify own decimal point , thousand separator chars.

thanks

qt doesn't support custom locale. deal group , decimal point characters trivial:

const qlocale & clocale = qlocale::c(); qstring ss = clocale.tostring(yourdoublenumber, 'f'); ss.replace(clocale.groupseparator(), yourgroupchar); ss.replace(clocale.decimalpoint(), yourdecimalpointchar); 

btw, spbots' question not irrelevant. more detail goal helps , lead different approach may serve better.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -