HEBench
hebench::cpp::Utilities Namespace Reference

Functions

std::uint64_t copyString (char *dst, std::uint64_t size, const std::string &src)
 Copies a C++ string object into a C-style string. More...
 

Function Documentation

◆ copyString()

std::uint64_t hebench::cpp::Utilities::copyString ( char *  dst,
std::uint64_t  size,
const std::string &  src 
)

Copies a C++ string object into a C-style string.

Parameters
[in]dstPoints to the destination array of characters. Can be null.
[in]sizeNumber of characters in array pointed to by dst.
[in]srcString to copy.
Returns
The number of characters required to copy \src completely into dst, including the C-style null terminator.

If dst is null, no copy is performed. Use this behavior to obtain information regarding the size required to hold src string.

Definition at line 13 of file utilities.cpp.