Yep this is valid.
You can have a null character in the middle of the string.
However, if you use a std::string with a null character in the middle with a c string
function your in undefined behaviour town - and nobody wants to be there!!!:
int n = strlen( strWithNullInMiddle.c_str() ); // Boom!!!