Logo Search packages:      
Sourcecode: parser version File versions  Download package

String Class Reference

#include <pa_string.h>

Inheritance diagram for String:

PA_Allocated

List of all members.


Detailed Description

String which knows the lang of all it's langs.

All pieces remember

Definition at line 60 of file pa_string.h.


Public Types

enum  Change_case_kind { CC_UPPER, CC_LOWER }
enum  Language {
  L_UNSPECIFIED = 0, L_CLEAN = '0', L_AS_IS = 'A', L_PASS_APPENDED = 'P',
  L_TAINTED = 'T', L_FILE_SPEC = 'F', L_HTTP_HEADER = 'h', L_MAIL_HEADER = 'm',
  L_URI = 'U', L_SQL = 'Q', L_JS = 'J', L_XML = 'X',
  L_HTML = 'H', L_REGEX = 'R', L_HTTP_COOKIE = 'C', L_OPTIMIZE_BIT = 0x80
}
typedef void(* Row_action )(Table &table, ArrayString *row, int prestart, int prefinish, int poststart, int postfinish, void *info)
enum  Trim_kind { TRIM_BOTH, TRIM_START, TRIM_END }

Public Member Functions

Stringappend (const String &src, Language lang, bool forced=false)
Stringappend_help_length (const char *str, size_t helper_length, Language lang)
Stringappend_know_length (const char *str, size_t known_length, Language lang)
Stringappend_strdup (const char *str, size_t helper_length, Language lang)
Stringappend_to (String &dest, Language lang, bool forced) const
bool as_bool () const
double as_double () const
int as_int () const
Stringchange_case (Charset &source_charset, Change_case_kind kind) const
const char * cstr (Language lang=L_AS_IS, SQL_Connection *connection=0, const Request_charsets *charsets=0) const
 convert to constant C string. if 'lang' known, forcing 'lang' to it
Body cstr_to_string_body (Language lang=L_AS_IS, SQL_Connection *connection=0, const Request_charsets *charsets=0) const
 convert to CORD. if 'lang' known, forcing 'lang' to it
char * cstrm (Language lang=L_AS_IS, SQL_Connection *connection=0, const Request_charsets *charsets=0) const
 convert to Modifiable C string. if 'lang' known, forcing 'lang' to it
bool deserialize (size_t prolog_size, void *buf, size_t buf_size)
 appends pieces from buf to self
const Stringescape (Charset &source_charset) const
char first_char () const
 extracts first char of a string, if any
bool is_empty () const
size_t length (Charset &charset) const
size_t length () const
Tablematch (Charset &source_charset, const String &regexp, const String *options, Row_action row_action, void *info, int &matches_count) const
Stringmid (Charset &charset, size_t from, size_t to, size_t helper_length=0) const
Stringmid (size_t substr_begin, size_t substr_end) const
 extracts [start, finish) piece of string
 operator const Body () const
 for convinient hash lookup
bool operator!= (const String &src) const
bool operator!= (const char *y) const
bool operator< (const String &src) const
Stringoperator<< (const Body src)
 now that we've declared specialization we can use it
Stringoperator<< (const char *src)
Stringoperator<< (const String &src)
bool operator<= (const String &src) const
bool operator== (const String &src) const
bool operator== (const char *y) const
bool operator> (const String &src) const
bool operator>= (const String &src) const
size_t pos (Charset &charset, const String &substr, size_t this_offset=0, Language lang=L_UNSPECIFIED) const
size_t pos (char c, size_t this_offset=0) const
size_t pos (const String &substr, size_t this_offset=0, Language lang=L_UNSPECIFIED) const
 String version of.
size_t pos (const Body substr, size_t this_offset=0, Language lang=L_UNSPECIFIED) const
const Stringreplace (const Dictionary &dict) const
Cm serialize (size_t prolog_size) const
 puts pieces to buf
void split (ArrayString &result, size_t &pos_after, const String &delim, Language lang=L_UNSPECIFIED, int limit=-1) const
void split (ArrayString &result, size_t &pos_after, const char *delim, Language lang=L_UNSPECIFIED, int limit=-1) const
bool starts_with (const char *y) const
 this starts with y
 String (const String &src)
 String (Body abody, Language alang)
 String (const C cstr, bool tainted=false)
 String (const char *cstr=0, size_t helper_length=0, bool tainted=false)
bool this_starts (const char *x) const
 x starts with this
const Stringtrim (Trim_kind kind=TRIM_BOTH, const char *chars=0) const

Static Public Member Functions

static void free (void *ptr)
static void * malloc (size_t size)
static void * malloc_atomic (size_t size)
static void operator delete (void *ptr)
static void * operator new (size_t size)
 the sole: instances allocated using our functions
static void * realloc (void *ptr, size_t size)
static char * strdup (const char *auto_variable_never_null, size_t helper_length=0)

Static Public Attributes

static const String Empty

Private Member Functions

void dump () const
Stringoperator= (const String &)
const char * v () const

Private Attributes

Body body
 all characters of string
Languages langs
 string characters lang

Classes

class  Body
struct  C
struct  Cm
union  Languages

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index