Tools.h++ Class Reference

Table Of Contents
Access to the RWCString's data as a null terminated string. This data is owned by the
RWCString and may not be deleted or changed. If the RWCString object itself changes or
goes out of scope, the pointer value previously returned may (will!) become invalid. While
the string is null-terminated, note that its length is still given by the member function
length(). That is, it may contain embedded nulls.
Assignment Operators
RWCString&
operator=(const char* cs);
Assignment operator. Copies the null-terminated character string pointed to by cs into self.
Returns a reference to self. This function is incompatible with cs strings with embedded
nulls. This function may be incompatible with cs MBCS strings.
RWCString&
operator=(const RWCString& str);
Assignment operator. The string will copy str's data. Returns a reference to self.
RWCString&
operator+=(const char* cs);
Append the null-terminated character string pointed to by cs to self. Returns a reference to
self. This function is incompatible with cs strings with embedded nulls. This function may
be incompatible with cs MBCS strings.
RWCString&
operator+=(const RWCString& str);
Append the string str to self. Returns a reference to self.
Indexing Operators
char&
operator[](size_t i);
char
operator[](size_t i) const;
Return the ith byte. The first variant can be used as an lvalue. The index i must be between
0 and the length of the string less one. Bounds checking is performed -- if the index is out
of range then an exceptionof type RWBoundsErr will occur.
char&
operator()(size_t i);
char
operator()(size_t i) const;
Return the ith byte. The first variant can be used as an lvalue. The index i must be between
0 and the length of the string less one. Bounds checking is performed if the pre-processor