13 std::uint64_t
copyString(
char *dst, std::uint64_t size,
const std::string &src)
15 std::uint64_t retval = src.size() + 1;
19 std::uint64_t min_size = std::min(size, retval);
21 std::copy_n(src.c_str(), min_size - 1, dst);
22 dst[min_size - 1] =
'\0';
std::uint64_t copyString(char *dst, std::uint64_t size, const std::string &src)
Copies a C++ string object into a C-style string.