15.12.2011 - version 0.1.1
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "pibytearray.h"
|
||||
#include "pichar.h"
|
||||
#include "math.h"
|
||||
|
||||
class PIStringList;
|
||||
|
||||
@@ -115,8 +116,12 @@ public:
|
||||
|
||||
PIString toUpperCase() const;
|
||||
PIString toLowerCase() const;
|
||||
#ifdef QNX
|
||||
PIString toNativeDecimalPoints() const {PIString s(*this); return s;}
|
||||
#else
|
||||
PIString toNativeDecimalPoints() const {PIString s(*this); if (currentLocale == 0) return s; return s.replaceAll(".", currentLocale->decimal_point);}
|
||||
|
||||
#endif
|
||||
|
||||
int find(const char str, const int start = 0) const;
|
||||
int find(const PIString str, const int start = 0) const;
|
||||
int find(const char * str, const int start = 0) const {return find(PIString(str), start);}
|
||||
@@ -146,6 +151,7 @@ public:
|
||||
PIString & setNumber(const float value) {clear(); *this += ftos(value); return *this;}
|
||||
PIString & setNumber(const double value) {clear(); *this += dtos(value); return *this;}
|
||||
PIString & setNumber(const ldouble value) {clear(); *this += dtos(value); return *this;}
|
||||
PIString & setReadableSize(long bytes);
|
||||
|
||||
//inline static PIString fromNumber(const char value) {return PIString(itos(value));}
|
||||
static PIString fromNumber(const int value) {return PIString(itos(value));}
|
||||
@@ -156,6 +162,7 @@ public:
|
||||
static PIString fromNumber(const double value) {return PIString(dtos(value));}
|
||||
static PIString fromNumber(const ldouble value) {return PIString(dtos(value));}
|
||||
static PIString fromBool(const bool value) {return PIString(value ? "true" : "false");}
|
||||
static PIString readableSize(long bytes) {PIString s; s.setReadableSize(bytes); return s;}
|
||||
|
||||
private:
|
||||
void appendFromChars(const char * c, int s);
|
||||
|
||||
Reference in New Issue
Block a user