Diff for /parser3/src/include/pa_string.h between versions 1.237 and 1.240

version 1.237, 2025/05/26 00:52:15 version 1.240, 2026/01/06 16:36:39
Line 12 Line 12
   
 // includes  // includes
 #include "pa_types.h"  #include "pa_types.h"
   #include "pa_int.h"
 #include "pa_array.h"  #include "pa_array.h"
   
 extern "C" { // cord's author forgot to do that  extern "C" { // cord's author forgot to do that
Line 71  public: Line 72  public:
   
 // generally useful  // generally useful
   
 double pa_atod(const char* str, const String* problem_source);  
 int pa_atoi(const char* str, int base=10, const String* problem_source=0);  
 unsigned int pa_atoui(const char *str, int base=10, const String* problem_source=0);  
 uint64_t pa_atoul(const char *str, int base=10, 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 699  public: Line 695  public:
         const String& trim(Trim_kind kind=TRIM_BOTH, const char* chars=0, Charset* source_charset=0) const;          const String& trim(Trim_kind kind=TRIM_BOTH, const char* chars=0, Charset* source_charset=0) const;
         double as_double() const { return pa_atod(cstr(), this); }          double as_double() const { return pa_atod(cstr(), this); }
         int as_int() const { return pa_atoi(cstr(), 0, this); }          int as_int() const { return pa_atoi(cstr(), 0, this); }
         bool as_bool() const { return as_int()!=0; }          pa_wint as_wint() const { return pa_atowi(cstr(), 0, this); }
           bool as_bool() const { return as_wint()!=0; }
         const String& escape(Charset& source_charset) const;          const String& escape(Charset& source_charset) const;
   
 private: //disabled  private: //disabled

Removed from v.1.237  
changed lines
  Added in v.1.240


E-mail: