#include <OTC/text/cstring.hh> class OTC_CString {
public:
virtual ~OTC_CString();
OTC_CString(char const* theString=0);
OTC_CString(char theChar, u_int theNum=1);
OTC_CString(char const* theString, u_int theNum);
friend ostream& operator<<( ostream& outs, OTC_CString const& theString );
};
OTC_CString
provides a mechanism for creating raw strings
which use only the amount of memory which is required for
the string. OTC_CString
should be used when creating
constant strings.
OTC_CString(char const* theString=0);
theString
. Only
uses enough memory to hold the string.
OTC_CString(char theChar, u_int theNum=1);
theNum
instances of theChar
. Only uses enough
memory to hold the string.
OTC_CString(char const* theString, u_int theNum);
theNum
characters of theString
. only
uses enough memory to hold the string.
Raises an exception if theString
is
0
but theLength
is greater than 0
.
friend ostream& operator<<(
ostream& outs,
OTC_CString const& theString
);
theString
to the stream outs
.
Width and justification specifications are
honoured.
OTC_String
, OTC_RString