--- parser3/src/include/pa_string.h 2010/08/27 02:53:34 1.198 +++ parser3/src/include/pa_string.h 2012/03/16 09:24:10 1.201 @@ -1,14 +1,14 @@ /** @file Parser: string class decl. - Copyright (c) 2001-2009 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ #ifndef PA_STRING_H #define PA_STRING_H -static const char * const IDENT_STRING_H="$Date: 2010/08/27 02:53:34 $"; +#define IDENT_PA_STRING_H "$Id: pa_string.h,v 1.201 2012/03/16 09:24:10 moko Exp $" // includes #include "pa_types.h" @@ -108,7 +108,6 @@ public: L_REGEX='R', ///< RegExp L_JSON='S', ///< JSON code L_HTTP_COOKIE='C', ///< cookies encoded as %uXXXX for compartibility with js functions encode/decode - L_FILE_POST='f', ///< temporary escaping zero-char L_PARSER_CODE='p', ///< ^process body // READ WARNING ABOVE BEFORE ADDING ANYTHING L_OPTIMIZE_BIT = 0x80 ///< flag, requiring cstr whitespace optimization @@ -581,6 +580,14 @@ public: String& append(const String& src, Language lang, bool forced=false) { return src.append_to(*this, lang, forced); } + String& append_quoted(const String* src, Language lang=L_JSON){ + *this << "\""; + if(src) + this->append(*src, lang, true/*forced lang*/); + *this << "\""; + return *this; + } + String& operator << (const String& src) { return append(src, L_PASS_APPENDED); } String& operator << (const char* src) { return append_help_length(src, 0, L_AS_IS); } String& operator << (const Body& src){