Go to the documentation of this file.
30 inline char* Foam::CStringList::stringCopy(
char *dest,
const std::string& str)
32 for (
auto iter = str.cbegin(); iter != str.cend(); ++iter)
70 template<
class StringType>
79 template<
class StringType>
142 return &(argv_[start]);
152 template<
class StringType>
155 return resetContent(input);
159 template<
class StringType>
162 return resetContent(input);
char ** strings() const
Return the list of C-strings (ie, argv)
Sub-ranges of a string with a structure similar to std::match_results, but without the underlying reg...
int reset(const UList< StringType > &input)
Copy the input list of strings.
const char * operator[](int i) const
Return element at the given index. No bounds checking.
const char * data() const
The flattened character content, with interspersed nul-chars.
CStringList()
Construct empty, adding content later (via reset).
int size() const noexcept
Return the number of C-strings (ie, argc)
size_t length() const
Overall length of the flattened character (data) content.
~CStringList()
Destructor. Invokes clear() to free memory.
bool empty() const noexcept
True if the size is zero.
void clear()
Clear contents and free memory.
static int count(const char *const argv[])
Count the number of parameters until the first nullptr.
An adapter for copying a list of C++ strings into a list of C-style strings for passing to C code tha...