Tools.h++ Class Reference

Table Of Contents
Persistence
None
Example
#include <rw/cstring.h>
#include <rw/rstream.h>
main(){
RWCString s("What I tell you is true.");
// Create a substring and use it as an lvalue:
s(19, 0) = "three times ";
cout << s << endl;
}
Program output:
What I tell you is three times true.
Assignment Operators
RWCSubString&
operator=(const RWCString&);
Assignment from an RWCString. The statements:
RWCString a;
RWCString b;
...
b(2, 3) = a;
will copy a's data into the substring b(2,3). The number of elements need not match: if
they differ, b will be resized appropriately. Sets self's extent to be the length of the
assigned RWCString. If self is the null substring, then the statement has no effect.
Returns a reference to self.
RWCSubString&
operator=(const RWCSubString&);
Assignment from an RWCSubString. The statements:
RWCString a;
RWCString b;
...
b(2, 3) = a(5,5);
will copy 5 characters of a's data into the substring b(2,3). The number of elements need