const char*
to make it behave in a way more useful to MySQL++.
More...
#include <const_string.h>
Public Types | |
typedef const char | value_type |
Type of the data stored in this object, when it is not equal to SQL null. | |
typedef unsigned int | size_type |
Type of "size" integers. | |
typedef const char & | const_reference |
Type used when returning a reference to a character in the string. | |
typedef const char * | const_iterator |
Type of iterators. | |
typedef const_iterator | iterator |
Same as const_iterator because the data cannot be changed. | |
Public Member Functions | |
const_string () | |
Create empty string. | |
const_string (const std::string &str) | |
Initialize string from existing C++ string. | |
const_string (const char *str) | |
Initialize string from existing C string. | |
const_string (const char *str, size_type len) | |
Initialize string from existing C string of known length. | |
~const_string () | |
Destroy string. | |
const_string & | operator= (const char *str) |
Assignment operator, from C string. | |
const_string & | operator= (const const_string &cs) |
Assignment operator, from other const_string. | |
size_type | length () const |
Return number of characters in the string. | |
size_type | size () const |
Return number of characters in string. | |
const_iterator | begin () const |
Return iterator pointing to the first character of the string. | |
const_iterator | end () const |
Return iterator pointing to one past the last character of the string. | |
size_type | max_size () const |
Return the maximum number of characters in the string. | |
const_reference | operator[] (size_type pos) const |
Return a reference to a character within the string. | |
const_reference | at (size_type pos) const |
Return a reference to a character within the string. | |
const char * | c_str () const |
Return a const pointer to the string data. Not necessarily null-terminated! | |
const char * | data () const |
Alias for c_str() . | |
int | compare (const const_string &str) const |
Lexically compare this string to another. |
const char*
to make it behave in a way more useful to MySQL++.
This class implements a small subset of the standard string class.
As of MySQL++ 2.3, it makes a copy of the string we are initialized with, instead of just copying the pointer. This is required to avoid problems with the new SSQLS + BLOB support.
|
Return a reference to a character within the string.
Unlike |
|
Lexically compare this string to another.
|
|
Return the maximum number of characters in the string.
Because this is a |