#include <StringUtils.h>
A helper structure to safely convert a std::vector<std::string>
to char**
.
toCharPtr
for a single string f(char**)
with a vector of strings v
, do: CStrArray
owns the data, and must therefore not be destroyed before the user function ends. Public Member Functions | |
Construction | |
template<typename T > | |
CStrArray (const T begin, const T end) | |
Create from begin and end iterators. | |
CStrArray (const std::vector< std::string > &data) | |
Create from a vector. | |
CStrArray (const std::initializer_list< std::string > &data) | |
Create from an initializer_list. | |
Properties | |
std::size_t | size () const |
The number of elements. | |
Element access | |
char ** | data () |
Get the data as a non-const char ** . | |
Public Attributes | |
std::vector< std::unique_ptr< char[]> > | smartPtrVector |
A vector of smart pointers to char[] . More... | |
std::vector< char * > | cStrVector |
A vector of char* . More... | |