--- parser3/src/include/pa_string.h 2012/05/24 12:49:25 1.203 +++ parser3/src/include/pa_string.h 2013/04/21 21:59:07 1.205 @@ -8,7 +8,7 @@ #ifndef PA_STRING_H #define PA_STRING_H -#define IDENT_PA_STRING_H "$Id: pa_string.h,v 1.203 2012/05/24 12:49:25 misha Exp $" +#define IDENT_PA_STRING_H "$Id: pa_string.h,v 1.205 2013/04/21 21:59:07 moko Exp $" // includes #include "pa_types.h" @@ -54,6 +54,7 @@ class VRegex; int pa_atoi(const char* str, const String* problem_source=0); double pa_atod(const char* str, const String* problem_source=0); +unsigned int pa_atoui(const char *str, int base, 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) @@ -608,11 +609,14 @@ public: return *this; } - /// extracts first char of a string, if any char first_char() const { return is_empty()?0:body.fetch(0); } + char last_char() const { + return is_empty()?0:body.fetch(body.length()-1); + } + bool operator < (const String& src) const { return body (const String& src) const { return body>src.body; } bool operator <= (const String& src) const { return body<=src.body; }