If the array was null-terminated this would be pretty straight forward:
unsigned char u_array[4] = { \'a\', \'s\', \'d\', \'\\0\' }; std::string str
std::string has a constructor taking an array of char and a length.
unsigned char u_array[4] = { 'a', 's', 'd', 'f' }; std::string str(reinterpret_cast(u_array), sizeo(u_array));