Subversion Repositories spk

Rev

Rev 48 | Rev 56 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 48 Rev 50
Line 4... Line 4...
4
#include "../spkdll.h"
4
#include "../spkdll.h"
-
 
5
 
-
 
6
enum {
-
 
7
	COMPARE_SAME		= 0,
-
 
8
	COMPARE_NEWER		= 1,
-
 
9
	COMPARE_OLDER		= -1,
-
 
10
};
5
 
11
 
6
namespace Utils {
12
namespace Utils {
7
/**
13
/**
8
 * String wrapper class
14
 * String wrapper class
9
 */
15
 */
Line 31... Line 37...
31
	void fromFloat(float f, int dp);
37
	void fromFloat(float f, int dp);
32
	void fromDouble(double f);
38
	void fromDouble(double f);
33
	void fromDouble(double f, int dp);
39
	void fromDouble(double f, int dp);
34
	const String &format(const char *sFormat, ...);
40
	const String &format(const char *sFormat, ...);
35
	
41
	
-
 
42
	static String PadNumber(long iNum, int iAmount);
36
	static String number(long l) { return String(l); }
43
	static String Number(long l) { return String(l); }
37
	static String fromFormat(const char *sFormat, ...);
44
	static String Format(const char *sFormat, ...);
-
 
45
 
38
	long toLong() const;
46
	long toLong() const;
39
	double toDouble() const;
47
	double toDouble() const;
40
	float toFloat() const;
48
	float toFloat() const;
41
 
49
 
42
	// casting operators
50
	// casting operators
Line 129... Line 137...
129
	String findRemove(const String &find) const;
137
	String findRemove(const String &find) const;
130
	String stripHtml() const;
138
	String stripHtml() const;
131
 
139
 
132
	bool isin(const String &str, bool bCaseSensative = false) const;
140
	bool isin(const String &str, bool bCaseSensative = false) const;
133
	bool isin(char c, bool bCaseSensative = false) const;
141
	bool isin(char c, bool bCaseSensative = false) const;
-
 
142
	int compareVersion(const Utils::String &v) const;
134
 
143
 
135
	// sub string
144
	// sub string
136
	String left(long num) const;
145
	String left(long num) const;
137
	String right(int num) const;
146
	String right(int num) const;
138
	String mid(int start, int end) const;
147
	String mid(int start, int end) const;
Line 140... Line 149...
140
	bool isNumber(bool integer = false) const;
149
	bool isNumber(bool integer = false) const;
141
	bool isCharNumber(int c) const;
150
	bool isCharNumber(int c) const;
142
	const String &removeFirstSpace();
151
	const String &removeFirstSpace();
143
	const String &removeEndSpace();
152
	const String &removeEndSpace();
144
	const String &truncate(int iNum);
153
	const String &truncate(int iNum);
-
 
154
	const String &padNumber(int iNum);
-
 
155
	const String &pad(int iAmoumt, char cWith);
145
 
156
 
146
	String lower() const;
157
	String lower() const;
147
	String upper() const;
158
	String upper() const;
148
	const String &toLower();
159
	const String &toLower();
149
	const String &toUpper();
160
	const String &toUpper();