In C++ strings are copied until a NULL character is received while feeding in a sequence of characters. But if you supply the number of characters to be read, will it copy past the NULL character? I have a situation where I may receive a message that has a NULL character in the middle and still useful information after it. The same question applies to append.
Similarly for find(), will it stop searching if it hits a NULL character?
std::stringthen yes, they can have \0 in the middle. std::string don't use the "ended by \0" convention. They have memory for storing the size. So they can be used as buffers.