Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qlocale_tools_p.h File Reference

(c85d8962576cdd6dbfce0508b585ab34cd94ebed)

#include "qlocale_p.h"
#include "qstring.h"
+ Include dependency graph for qlocale_tools_p.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  StrayCharacterMode { TrailingJunkProhibited , TrailingJunkAllowed , WhitespacesAllowed }
 

Functions

QSimpleParsedNumber< double > qt_asciiToDouble (const char *num, qsizetype numLen, StrayCharacterMode strayCharMode=TrailingJunkProhibited)
 
void qt_doubleToAscii (double d, QLocaleData::DoubleForm form, int precision, char *buf, qsizetype bufSize, bool &sign, int &length, int &decpt)
 
QString qulltoBasicLatin (qulonglong l, int base, bool negative)
 
QString qulltoa (qulonglong l, int base, const QStringView zero)
 
char * qulltoa2 (char *p, qulonglong n, int base)
 
Q_CORE_EXPORT QString qdtoa (qreal d, int *decpt, int *sign)
 
QString qdtoBasicLatin (double d, QLocaleData::DoubleForm form, int precision, bool uppercase)
 
QByteArray qdtoAscii (double d, QLocaleData::DoubleForm form, int precision, bool uppercase)
 
int wholePartSpace (double d)
 
template<typename UcsInt>
UcsInt unicodeForDigit (uint digit, UcsInt zero)
 
Q_CORE_EXPORT double qstrntod (const char *s00, qsizetype len, char const **se, bool *ok)
 
double qstrtod (const char *s00, char const **se, bool *ok)
 
Q_AUTOTEST_EXPORT QSimpleParsedNumber< qlonglongqstrntoll (const char *nptr, qsizetype size, int base)
 
QSimpleParsedNumber< qulonglongqstrntoull (const char *nptr, qsizetype size, int base)
 

Enumeration Type Documentation

◆ StrayCharacterMode

Enumerator
TrailingJunkProhibited 
TrailingJunkAllowed 
WhitespacesAllowed 

Definition at line 36 of file qlocale_tools_p.h.

Function Documentation

◆ qdtoa()

QString qdtoa ( qreal d,
int * decpt,
int * sign )
nodiscard

Definition at line 588 of file qlocale_tools.cpp.

◆ qdtoAscii()

QByteArray qdtoAscii ( double d,
QLocaleData::DoubleForm form,
int precision,
bool uppercase )
nodiscard

Definition at line 809 of file qlocale_tools.cpp.

Referenced by QByteArray::number().

+ Here is the caller graph for this function:

◆ qdtoBasicLatin()

QString qdtoBasicLatin ( double d,
QLocaleData::DoubleForm form,
int precision,
bool uppercase )
nodiscard

Definition at line 804 of file qlocale_tools.cpp.

◆ qstrntod()

double qstrntod ( const char * s00,
qsizetype len,
const char ** se,
bool * ok )
nodiscard

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 578 of file qlocale_tools.cpp.

◆ qstrntoll()

QSimpleParsedNumber< qlonglong > qstrntoll ( const char * nptr,
qsizetype size,
int base )
nodiscard

Definition at line 443 of file qlocale_tools.cpp.

References scanPrefix().

+ Here is the call graph for this function:

◆ qstrntoull()

QSimpleParsedNumber< qulonglong > qstrntoull ( const char * nptr,
qsizetype size,
int base )
nodiscard

Definition at line 425 of file qlocale_tools.cpp.

References scanPrefix().

+ Here is the call graph for this function:

◆ qstrtod()

double qstrtod ( const char * s00,
char const ** se,
bool * ok )
inlinenodiscard

Definition at line 103 of file qlocale_tools_p.h.

◆ qt_asciiToDouble()

QSimpleParsedNumber< double > qt_asciiToDouble ( const char * num,
qsizetype numLen,
StrayCharacterMode strayCharMode = TrailingJunkProhibited )
nodiscard

Definition at line 256 of file qlocale_tools.cpp.

References TrailingJunkAllowed, and WhitespacesAllowed.

◆ qt_doubleToAscii()

QT_CLOCALE_HOLDER void qt_doubleToAscii ( double d,
QLocaleData::DoubleForm form,
int precision,
char * buf,
qsizetype bufSize,
bool & sign,
int & length,
int & decpt )

Definition at line 48 of file qlocale_tools.cpp.

References QLocaleData::DFExponent, and QLocaleData::DFSignificantDigits.

◆ qulltoa()

QString qulltoa ( qulonglong l,
int base,
const QStringView zero )
nodiscard

Definition at line 524 of file qlocale_tools.cpp.

◆ qulltoa2()

char * qulltoa2 ( char * p,
qulonglong n,
int base )
nodiscard

Definition at line 559 of file qlocale_tools.cpp.

◆ qulltoBasicLatin()

QString qulltoBasicLatin ( qulonglong l,
int base,
bool negative )
nodiscard

Definition at line 506 of file qlocale_tools.cpp.

◆ unicodeForDigit()

template<typename UcsInt>
UcsInt unicodeForDigit ( uint digit,
UcsInt zero )
inlinenodiscard

Definition at line 85 of file qlocale_tools_p.h.

◆ wholePartSpace()

int wholePartSpace ( double d)
inlinenodiscard

Definition at line 75 of file qlocale_tools_p.h.