svcore  1.9
StringBits Class Reference

#include <StringBits.h>

List of all members.

Static Public Member Functions

static double stringToDoubleLocaleFree (QString s, bool *ok=0)
 Convert a string to a double using basic "C"-locale syntax, i.e.
static QStringList splitQuoted (QString s, QChar separator)
 Split a string at the given separator character, allowing quoted sections that contain the separator.
static QStringList split (QString s, QChar separator, bool quoted)
 Split a string at the given separator character.

Detailed Description

Definition at line 28 of file StringBits.h.


Member Function Documentation

double StringBits::stringToDoubleLocaleFree ( QString  s,
bool *  ok = 0 
) [static]

Convert a string to a double using basic "C"-locale syntax, i.e.

always using '.' as a decimal point. We use this as a fallback when parsing files from an unknown source, if locale-specific conversion fails. Does not support e notation. If ok is non-NULL, *ok will be set to true if conversion succeeds or false otherwise.

Definition at line 24 of file StringBits.cpp.

Referenced by CSVFileReader::convertTimeValue(), and CSVFormat::guessQualities().

QStringList StringBits::splitQuoted ( QString  s,
QChar  separator 
) [static]

Split a string at the given separator character, allowing quoted sections that contain the separator.

If the separator is ' ', any (amount of) whitespace will be considered as a single separator. If the separator is another whitespace character such as '', it will be used literally.

Definition at line 71 of file StringBits.cpp.

Referenced by split().

QStringList StringBits::split ( QString  s,
QChar  separator,
bool  quoted 
) [static]

Split a string at the given separator character.

If quoted is true, do so by calling splitQuoted (above). If quoted is false, use QString::split; if separator is ' ', use SkipEmptyParts behaviour, otherwise use KeepEmptyParts (this is analogous to the behaviour of splitQuoted).

Definition at line 201 of file StringBits.cpp.

References splitQuoted().

Referenced by CSVFormat::guessQualities(), CSVFormat::guessSeparator(), and CSVFileReader::load().


The documentation for this class was generated from the following files: