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 Methods | |
const_string () | |
Create empty string. | |
const_string (const char *str) | |
Initialize string from existing C string. | |
const_string & | operator= (const char *str) |
Assignment operator. | |
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 | length () const |
Return number of characters in 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, 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.
Objects are created from an existing const char*
variable by copying the pointer only. Therefore, the object pointed to by that pointer needs to exist for at least as long as the const_string object that wraps it.
|
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 |