const char *cstr = str.ToNewCString();
const char *cstr = ToNewCString(str);
extern ostream &operator<<( ostream &s, nsString &str ) {    const char *cstr = str.ToNewCString();    s << cstr;    delete [] (char*)cstr;    return s;}