Subversion Repositories spk

Rev

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

Rev 8 Rev 10
Line 30... Line 30...
30
	void fromFloat(float f, int dp);
30
	void fromFloat(float f, int dp);
31
	void fromDouble(double f);
31
	void fromDouble(double f);
32
	void fromDouble(double f, int dp);
32
	void fromDouble(double f, int dp);
33
	const String &format(const char *sFormat, ...);
33
	const String &format(const char *sFormat, ...);
34
	
34
	
-
 
35
	static String number(long l) { return String(l); }
35
	static String fromFormat(const char *sFormat, ...);
36
	static String fromFormat(const char *sFormat, ...);
36
	long toLong() const;
37
	long toLong() const;
37
	double toDouble() const;
38
	double toDouble() const;
38
	float toFloat() const;
39
	float toFloat() const;
39
 
40
 
Line 41... Line 42...
41
	inline operator const char *() const			{ return (const char *)this->c_str(); }
42
	inline operator const char *() const			{ return (const char *)this->c_str(); }
42
	inline operator char *() const					{ return (char *)this->c_str(); }
43
	inline operator char *() const					{ return (char *)this->c_str(); }
43
	inline operator const unsigned char *() const	{ return (const unsigned char *)this->c_str(); }
44
	inline operator const unsigned char *() const	{ return (const unsigned char *)this->c_str(); }
44
	inline operator unsigned char *() const			{ return (unsigned char *)this->c_str(); }
45
	inline operator unsigned char *() const			{ return (unsigned char *)this->c_str(); }
45
	inline operator const std::string &() const		{ return (const std::string &)*this; }
46
	inline operator const std::string &() const		{ return (const std::string &)*this; }
-
 
47
	inline operator const int () const				{ return this->toLong(); }
46
	inline operator const long () const				{ return this->toLong(); }
48
	inline operator const long () const				{ return this->toLong(); }
47
	inline operator const double () const			{ return this->toDouble(); }
49
	inline operator const double () const			{ return this->toDouble(); }
48
	inline operator const float () const			{ return this->toFloat(); }
50
	inline operator const float () const			{ return this->toFloat(); }
-
 
51
	inline operator const bool () const				{ return (this->toLong()) ? true : false; }
49
 
52
 
50
	// assignment operators
53
	// assignment operators
51
	const String &operator= ( const String &str );
54
	const String &operator= ( const String &str );
52
	const String &operator= ( const std::string &str );
55
	const String &operator= ( const std::string &str );
53
	const String &operator= ( const char *str );
56
	const String &operator= ( const char *str );
Line 107... Line 110...
107
 
110
 
108
	// tokens
111
	// tokens
109
	int countToken(const char *token) const;
112
	int countToken(const char *token) const;
110
	String token(const char *token, int tok) const;
113
	String token(const char *token, int tok) const;
111
	String tokens(const char *token, int from, int to = 0) const;
114
	String tokens(const char *token, int from, int to = 0) const;
-
 
115
	String *tokenise(const char *token, int *max) const;
112
 
116
 
113
	String findReplace(const String &find, const String &replace ) const;
117
	String findReplace(const String &find, const String &replace ) const;
-
 
118
	const String &remove(char c);
-
 
119
	String removeChar(char c) const;
114
 
120
 
115
	bool isin(const String &str, bool bCaseSensative = false) const;
121
	bool isin(const String &str, bool bCaseSensative = false) const;
116
	bool isin(char c, bool bCaseSensative = false) const;
122
	bool isin(char c, bool bCaseSensative = false) const;
117
 
123
 
118
	String left(long num) const;
124
	String left(long num) const;