--- parser3/src/include/pa_string.h 2025/05/26 00:52:15 1.237 +++ parser3/src/include/pa_string.h 2026/04/25 13:38:46 1.241 @@ -1,17 +1,18 @@ /** @file Parser: string class decl. - Copyright (c) 2001-2024 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2026 Art. Lebedev Studio (https://www.artlebedev.com) Authors: Konstantin Morshnev , Alexandr Petrosian */ #ifndef PA_STRING_H #define PA_STRING_H -#define IDENT_PA_STRING_H "$Id: pa_string.h,v 1.237 2025/05/26 00:52:15 moko Exp $" +#define IDENT_PA_STRING_H "$Id: pa_string.h,v 1.241 2026/04/25 13:38:46 moko Exp $" // includes #include "pa_types.h" +#include "pa_int.h" #include "pa_array.h" extern "C" { // cord's author forgot to do that @@ -71,11 +72,6 @@ public: // 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 #define STRING_NOT_FOUND ((size_t)-1) @@ -699,7 +695,8 @@ public: 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); } 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; private: //disabled