diff options
author | Pixel <Pixel> | 2002-07-21 11:12:13 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2002-07-21 11:12:13 +0000 |
commit | 6528f07c516efe4d3b344f01740067878d5d9a43 (patch) | |
tree | f097e6797752dffe7b498a4f153e83bdeb59f024 /includes/String.h | |
parent | b54786a5120b48bd98fc4b199176d45bda3c2d67 (diff) |
Hello Baltisot
Diffstat (limited to 'includes/String.h')
-rw-r--r-- | includes/String.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/includes/String.h b/includes/String.h new file mode 100644 index 0000000..b53936f --- /dev/null +++ b/includes/String.h @@ -0,0 +1,67 @@ +#ifndef __STRING_H__ +#define __STRING_H__ +#ifdef __cplusplus + +#include <iostream.h> +#include <string.h> +#include <Exceptions.h> + +class String : public Base { + public: + String(const String &); + String(const char * = ""); + String(char); + String(int); + String(unsigned int); +#ifdef USE_LONGLONG + String(long long); + String(unsigned long long); +#endif + String(double); + ~String(); + const char * set(const char *, ...); + const char * set(const String &, ...); + const char * to_charp(size_t = 0, ssize_t = -1) const; + String extract(size_t = 0, ssize_t = -1) const; + char * strdup(size_t = 0, ssize_t = -1) const; + int to_int() const; + double to_double() const; + String to_sqldate() const; + String to_sqltime() const; + String from_sqldate() const; + String from_sqltime() const; + double datedif(const String &) const; + bool is_date() const; + bool is_number() const; + bool is_float() const; + bool is_time() const; + size_t strlen() const; + ssize_t strchr(char, size_t = 0) const; + ssize_t strrchr(char) const; + ssize_t strstr(const String &) const; + int strchrcnt(char) const; + String & operator=(const String &); + String operator+(const String &) const; + String & operator+=(const String &); + bool operator!=(const String &) const; + bool operator==(const String &) const; + bool operator<=(const String &) const; + bool operator>=(const String &) const; + bool operator<(const String &) const; + bool operator>(const String &) const; + char operator[](size_t i) const; + + private: + String(int hs, const char *); + static char t[]; + char * str; + size_t siz; +}; + +ostream & operator<<(ostream &, const String &); +istream & operator>>(istream &, String &); + +#else +#error This only works with a C++ compiler +#endif +#endif |