Lightweight string class, used internally in some parts of OMNeT++. More...
#include <opp_string.h>
Public Member Functions | |
opp_string () | |
opp_string (const char *s) | |
opp_string (const char *s, int n) | |
opp_string (const std::string &s) | |
opp_string (const opp_string &s) | |
~opp_string () | |
const char * | c_str () const |
bool | empty () const |
char * | buffer () |
char * | reserve (unsigned size) |
const char * | operator= (const char *s) |
opp_string & | operator= (const opp_string &s) |
opp_string & | operator= (const std::string &s) |
bool | operator< (const opp_string &s) const |
opp_string & | operator+= (const char *s) |
opp_string & | operator+= (const opp_string &s) |
opp_string & | operator+= (const std::string &s) |
opp_string | operator+ (const char *s) |
opp_string | operator+ (const opp_string &s) |
opp_string | operator+ (const std::string &s) |
Lightweight string class, used internally in some parts of OMNeT++.
In simulation models it is better to use std::string or const char * instead.
opp_string has only one data member, a char* pointer. Allocation and deallocation of the contents takes place via opp_strdup() and operator delete.
char* opp_string::buffer | ( | ) | [inline] |
Returns pointer to the internal buffer where the string is stored.
It is allowed to write into the string via this pointer, but the length of the string should not be exceeded.