[Qt-interest] QString::toDouble with the string "inf"

Julien Cugnière julien.cugniere at gmail.com
Mon Jun 22 17:20:25 CEST 2009


Hi all,
It seems QString::toDouble knows how to convert a string such as "inf",
"-inf", or "nan" into the corresponding double representation. The code to
handle these special numbers is in qlocale.cpp, but it's not documented
anywhere. I'd like to know if I can rely on this behavior, or if it's
intentionally omitted from the documentation so nobody relies on it.

I'm asking because I need this functionality, and it would be a pain to
write and use my own wrapper around QString to implement a functionality
that's already there !

Best regards,

-- 
Julien Cugnière
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090622/41f88684/attachment.html 


More information about the Qt-interest-old mailing list