Subversion Repositories spk

Rev

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

Rev 160 Rev 170
Line 11... Line 11...
11
 
11
 
12
#pragma warning( push )
12
#pragma warning( push )
13
#pragma warning( disable : 4251)
13
#pragma warning( disable : 4251)
14
 
14
 
15
namespace Utils {
15
namespace Utils {
-
 
16
	std::wstring s2ws(const std::string& str);
-
 
17
	std::string ws2s(const std::wstring& wstr);
-
 
18
 
16
/**
19
/**
17
 * String wrapper class
20
 * String wrapper class
18
 */
21
 */
19
class SPKEXPORT String : public std::string
22
class SPKEXPORT String : public std::string
20
{
23
{
Line 29... Line 32...
29
	String(const String &str);
32
	String(const String &str);
30
	String(long l);
33
	String(long l);
31
	String(unsigned long l);
34
	String(unsigned long l);
32
	String(float f);
35
	String(float f);
33
	String(double f);
36
	String(double f);
-
 
37
	String(wchar_t* str, int len = -1)
-
 
38
	{
-
 
39
		this->assign(ws2s(std::wstring(str)));
-
 
40
	}
34
 
41
 
35
	virtual ~String(void);
42
	virtual ~String(void);
36
 
43
 
37
	// conversion functions
44
	// conversion functions
38
	void fromLong(long l);
45
	void fromLong(long l);
Line 188... Line 195...
188
private:
195
private:
189
	bool _isCharNumber(char c) const;
196
	bool _isCharNumber(char c) const;
190
	Utils::String::size_type _token_nextPos(const char *token, Utils::String::size_type curPos) const;
197
	Utils::String::size_type _token_nextPos(const char *token, Utils::String::size_type curPos) const;
191
};
198
};
192
 
199
 
193
SPKEXPORT String operator+(const char *str1, const String &str2);
200
SPKEXPORT String operator+(const char* str1, const String& str2);
-
 
201
SPKEXPORT String operator+(const unsigned char* str1, const String& str2);
194
 
202
 
195
#pragma warning( pop )
203
#pragma warning( pop )
196
 
204
 
197
}
205
}