Remove the return value and write the result to a string (pointer) parameter. Use `std::string::assign()`.