Data Overview

From reSIProcate
Revision as of 13:29, 15 November 2004 by Rjsparks (talk | contribs)
Jump to navigation Jump to search

Data is resiprocate's string class. It is named Data rather than String for historical reasons. VOCAL had a reference counting version of Data. Resiprocate's version is not reference counting.

Data handles 8 bit character buffers.

Data is internally aware of its content length and is not guaranteed to be null terminated. Date::data() returns a raw pointer to internal memory. Data::c_str() also returns a raw pointer to internal memory, but will guarantee that the internal buffer is null terminated, by copying it if necessary.

c_str() is generally necessary only when transitioning to another string representation, like char* or std::string.