2 #define _CSDBG_STRING 1
10 #if defined CSDBG_WITH_PLUGIN || defined CSDBG_WITH_HIGHLIGHT
53 virtual string&
format(
const i8*, va_list);
59 friend std::ostream&
operator<<(std::ostream&,
const string&);
72 virtual string*
clone()
const;
77 virtual const i8*
cstr()
const;
85 virtual string&
set(
const i8*, ...);
87 virtual string&
set(
const string&);
105 virtual string&
clear();
107 virtual string&
append(
const string&);
109 virtual string&
append(
const i8*, ...);
113 virtual i32 cmp(
const string&,
bool =
false)
const;
115 virtual bool match(
const string&,
bool =
false)
const;
117 #if defined CSDBG_WITH_PLUGIN || defined CSDBG_WITH_HIGHLIGHT
120 virtual string&
insert(
u32,
const string&);
virtual string & trim(i32=0)
Remove leading and/or trailing whitespace characters.
virtual string & append(const string &)
Append a string.
virtual string * clone() const
Object virtual copy constructor.
This abstract class serves as the root of the class hierarchy tree.
virtual string & set(const i8 *,...)
Fill with a printf-style format C-string expanded with the values of a variable argument list...
virtual u32 available() const
Get the available buffer size, the number of characters that can be appended without reallocation...
virtual u32 bufsize() const
Get the buffer size.
virtual string & operator+=(const string &)
Compound addition-assignment operator (append)
virtual string & format(const i8 *, va_list)
Fill with a printf-style format C-string expanded with the values of a variable argument list...
char i8
8-bit signed integer
virtual ~string()
Object destructor.
Class csdbg::object definition.
friend std::ostream & operator<<(std::ostream &, const string &)
Stream insertion operator for csdbg::string objects.
virtual string & operator=(const string &)
Assignment operator.
Class csdbg::chain definition and method implementation.
virtual string & insert(u32, const string &)
Insert a string at a specified position.
string(u32=0)
Object constructor.
virtual string & memalign(u32, bool=false)
Allocate aligned memory, mandate a minimum buffer size.
virtual i8 & operator[](u32)
Subscript operator.
unsigned char u8
8-bit unsigned integer
virtual string & clear()
Clear contents.
virtual i32 cmp(const string &, bool=false) const
Compare to another string.
virtual i8 & at(u32)
Get/set the character at an offset.
virtual const i8 * cstr() const
Get the C-string equivalent.
Lightweight string buffer class (for ISO-8859-1 text)
virtual bool match(const string &, bool=false) const
Match against a POSIX extended regular expression.
unsigned int u32
32-bit unsigned integer
int i32
32-bit signed integer
virtual u32 length() const
Get the character count.
virtual string & shred(u8=0)
Fill the whole buffer with a constant byte.
virtual chain< string > * split(const string &, bool=true, bool=false) const
Tokenize using a POSIX extended regular expression.
u32 m_length
Character count.