|
|
| version 1.151, 2003/10/21 05:11:00 | version 1.155, 2004/01/30 09:56:49 |
|---|---|
| Line 8 | Line 8 |
| #ifndef PA_STRING_H | #ifndef PA_STRING_H |
| #define PA_STRING_H | #define PA_STRING_H |
| static const char* IDENT_STRING_H="$Date$"; | static const char * const IDENT_STRING_H="$Date$"; |
| // includes | // includes |
| Line 36 class Request_charsets; | Line 36 class Request_charsets; |
| class String; | class String; |
| typedef Array<const String*> ArrayString; | typedef Array<const String*> ArrayString; |
| // generally useful | |
| int pa_atoi(const char* str, const String* problem_source=0); | |
| double pa_atod(const char* str, const String* problem_source=0); | |
| /// this is result of pos functions which mean that substr were not found | /// this is result of pos functions which mean that substr were not found |
| #define STRING_NOT_FOUND ((size_t)-1) | #define STRING_NOT_FOUND ((size_t)-1) |
| Line 340 public: | Line 345 public: |
| private: | private: |
| Languages langs; ///< string characters lang | |
| Body body; ///< all characters of string | Body body; ///< all characters of string |
| Languages langs; ///< string characters lang | |
| const char* v() const; | const char* v() const; |
| Line 355 public: | Line 360 public: |
| explicit String(const char* cstr=0, size_t helper_length=0, bool tainted=false); | explicit String(const char* cstr=0, size_t helper_length=0, bool tainted=false); |
| explicit String(const C cstr, bool tainted=false); | explicit String(const C cstr, bool tainted=false); |
| String(Body abody, Language alang): body(abody), langs(alang) { | String(Body abody, Language alang): body(abody), langs(alang) { |
| assert(!body.is_empty()); | |
| ASSERT_STRING_INVARIANT(*this); | ASSERT_STRING_INVARIANT(*this); |
| } | } |
| String(const String& src): body(src.body), langs(src.langs) { | String(const String& src): body(src.body), langs(src.langs) { |
| Line 477 public: | Line 481 public: |
| String& change_case(Charset& source_charset, | String& change_case(Charset& source_charset, |
| Change_case_kind kind) const; | Change_case_kind kind) const; |
| const String& replace(const Dictionary& dict) const; | const String& replace(const Dictionary& dict) const; |
| double as_double() const; | double as_double() const { return pa_atod(cstr(), this); } |
| int as_int() const; | int as_int() const { return pa_atoi(cstr(), this); } |
| private: //disabled | private: //disabled |