Diff for /parser3/src/include/pa_string.h between versions 1.62 and 1.71

version 1.62, 2001/04/03 05:23:40 version 1.71, 2001/04/05 13:19:42
Line 18 Line 18
 #include "pa_pool.h"  #include "pa_pool.h"
 #include "pa_types.h"  #include "pa_types.h"
   
   class Table;
   
 /**  /**
         $MAIN:html-typo table elements must enlarge string not more that that          $MAIN:html-typo table elements must enlarge string not more that that
         that's a tradeoff - otherwise we'd have to scan string twice:          that's a tradeoff - otherwise we'd have to scan string twice:
Line 53 Line 55
 #define APPEND_CONST(src) APPEND_CLEAN(src, 0, 0, 0)  #define APPEND_CONST(src) APPEND_CLEAN(src, 0, 0, 0)
   
 class Array;  class Array;
   class SQL_Connection;
   
 /**   /** 
         Pooled string.          Pooled string.
Line 109  public: Line 112  public:
         String(Pool& apool, const char *src=0, bool tainted=false);          String(Pool& apool, const char *src=0, bool tainted=false);
         String(const String& src);          String(const String& src);
         size_t size() const { return fsize; }          size_t size() const { return fsize; }
         /// convert to C string          /// convert to C string. if 'lang' known, forcing 'lang' to it
         char *cstr() const {          char *cstr(Untaint_lang lang=UL_UNKNOWN, SQL_Connection *connection=0) const {
                 char *result=(char *)malloc(size()*UNTAINT_TIMES_BIGGER+1);                  char *result=(char *)malloc(size()*UNTAINT_TIMES_BIGGER+1);
                 char *eol=store_to(result);                  char *eol=store_to(result, lang, connection);
                 *eol=0;                  *eol=0;
                 return result;                  return result;
         }          }
Line 164  public: Line 167  public:
         uint hash_code() const;          uint hash_code() const;
   
         /// extracts [start, finish) piece of string          /// extracts [start, finish) piece of string
         String& piece(size_t start, size_t finish) const;          String& mid(size_t start, size_t finish) const;
   
         /// @return position of substr in string, -1 means "not found" [String version]          /// @return position of substr in string, -1 means "not found" [String version]
         int pos(const String& substr,           int pos(const String& substr, 
Line 182  public: Line 185  public:
                 const String& delim,                   const String& delim, 
                 Untaint_lang lang, int limit=-1) const;                  Untaint_lang lang, int limit=-1) const;
   
           typedef void (*Row_action)(Table& table, Array *row, int start, int finish, 
                   void *info);
           bool match(const String *aorigin,
                   const String& regexp, 
                   const String *options,
                   Table **table,
                   Row_action row_action, void *info) const;
   
 #ifndef NO_STRING_ORIGIN  #ifndef NO_STRING_ORIGIN
         /// origin of string. calculated by first row          /// origin of string. calculated by first row
Line 233  private: Line 243  private:
                 return append_here == link_row;                  return append_here == link_row;
         }          }
         void expand();          void expand();
         char *String::store_to(char *dest) const;          char *String::store_to(char *dest, 
                   Untaint_lang lang=UL_UNKNOWN, SQL_Connection *connection=0) const;
   
 private: //disabled  private: //disabled
   

Removed from v.1.62  
changed lines
  Added in v.1.71


E-mail: