![]() |
Qt 6.x
The Qt SDK
|
Go to the source code of this file.
Classes | |
struct | QSimpleParsedNumber< T > |
Enumerations | |
enum | StrayCharacterMode { TrailingJunkProhibited , TrailingJunkAllowed , WhitespacesAllowed } |
enum StrayCharacterMode |
Enumerator | |
---|---|
TrailingJunkProhibited | |
TrailingJunkAllowed | |
WhitespacesAllowed |
Definition at line 23 of file qlocale_tools_p.h.
|
inlineconstexpr |
Definition at line 53 of file qlocale_tools_p.h.
References d.
Referenced by QLocaleData::doubleToString(), dtoString(), qt_asciiToDouble(), and qt_doubleToAscii().
Definition at line 572 of file qlocale_tools.cpp.
References d, QLocaleData::DFSignificantDigits, digits(), QLocale::FloatingPointShortest, qt_doubleToAscii(), and sign().
Referenced by QV4::RuntimeHelpers::numberToString().
QByteArray qdtoAscii | ( | double | d, |
QLocaleData::DoubleForm | form, | ||
int | precision, | ||
bool | uppercase | ||
) |
Definition at line 793 of file qlocale_tools.cpp.
Referenced by QByteArray::number().
QString qdtoBasicLatin | ( | double | d, |
QLocaleData::DoubleForm | form, | ||
int | precision, | ||
bool | uppercase | ||
) |
Definition at line 788 of file qlocale_tools.cpp.
Referenced by QString::number().
Q_CORE_EXPORT double qstrntod | ( | const char * | s00, |
qsizetype | len, | ||
const char ** | se, | ||
bool * | ok | ||
) |
Converts the initial portion of the string pointed to by s00 to a double, using the 'C' locale. The function sets the pointer pointed to by se to point to the character past the last character converted.
Definition at line 562 of file qlocale_tools.cpp.
References ok, qt_asciiToDouble(), and TrailingJunkAllowed.
Referenced by qstrtod().
Q_AUTOTEST_EXPORT QSimpleParsedNumber< qlonglong > qstrntoll | ( | const char * | nptr, |
qsizetype | size, | ||
int | base | ||
) |
Definition at line 439 of file qlocale_tools.cpp.
References ascii_isspace(), base, begin(), isDigitForBase(), and scanPrefix().
Referenced by QLocaleData::bytearrayToLongLong(), deviceNumber(), getWinLocaleName(), parsePosixTime(), and qt_doubleToAscii().
QSimpleParsedNumber< qulonglong > qstrntoull | ( | const char * | nptr, |
qsizetype | size, | ||
int | base | ||
) |
Definition at line 421 of file qlocale_tools.cpp.
References ascii_isspace(), base, begin(), and scanPrefix().
Referenced by QLocaleData::bytearrayToUnsLongLong(), from_string(), parse_field_width(), QIPAddressUtils::parseIp4Internal(), QIPAddressUtils::parseIp6(), and winIso639LangName().
|
inline |
Definition at line 87 of file qlocale_tools_p.h.
References ok, and qstrntod().
Referenced by QPSQLResult::data(), QV4::GlobalFunctions::method_parseFloat(), qt_color_from_string(), QV4::RuntimeHelpers::stringToNumber(), and toDouble().
QSimpleParsedNumber< double > qt_asciiToDouble | ( | const char * | num, |
qsizetype | numLen, | ||
StrayCharacterMode | strayCharMode = TrailingJunkProhibited |
||
) |
Definition at line 253 of file qlocale_tools.cpp.
References c2, d, fmt, i, isZero(), Q_ASSERT, qIsFinite(), qIsNaN(), qsnprintf(), qt_inf(), qt_qnan(), TrailingJunkAllowed, TrailingJunkProhibited, and WhitespacesAllowed.
Referenced by qstrntod(), QLocaleData::stringToDouble(), QStringView::toDouble(), and QtPrivate::toDouble().
void qt_doubleToAscii | ( | double | d, |
QLocaleData::DoubleForm | form, | ||
int | precision, | ||
char * | buf, | ||
qsizetype | bufSize, | ||
bool & | sign, | ||
int & | length, | ||
int & | decpt | ||
) |
Definition at line 45 of file qlocale_tools.cpp.
References d, QLocaleData::DFDecimal, QLocaleData::DFExponent, QLocaleData::DFSignificantDigits, QLocale::FloatingPointShortest, form, isZero(), Q_ASSERT, qMin(), qstrntoll(), qt_is_inf(), qt_is_nan(), sign(), and wholePartSpace().
Referenced by QLocaleData::doubleToString(), dtoString(), and qdtoa().
QString qulltoa | ( | qulonglong | l, |
int | base, | ||
const QStringView | zero | ||
) |
Definition at line 520 of file qlocale_tools.cpp.
References base, QChar::highSurrogate(), QChar::lowSurrogate(), number, QChar::surrogateToUcs4(), unicodeForDigit(), and zero.
Referenced by QLocaleData::longLongToString(), QIPAddressUtils::number(), and QLocaleData::unsLongLongToString().
QString qulltoBasicLatin | ( | qulonglong | l, |
int | base, | ||
bool | negative | ||
) |
Definition at line 502 of file qlocale_tools.cpp.
References base, number, and QStringLiteral.
Referenced by QString::number(), and QString::number().
|
inline |
Definition at line 69 of file qlocale_tools_p.h.
References Q_ASSERT, and zero.
Referenced by QLocaleData::doubleToString(), and qulltoa().
|
inline |
Definition at line 59 of file qlocale_tools_p.h.
Referenced by QLocaleData::doubleToString(), dtoString(), and qt_doubleToAscii().