30 inline char* Foam::CStringList::stringCopy(
char *dest,
const std::string& src)
33 const size_t len = src.length();
34 for (
size_t i = 0; i < len; ++i)
72 template<
class StringType>
81 template<
class StringType>
138 return &(argv_[start]);
142 template<
class StringType>
145 return resetContent(
input);
149 template<
class StringType>
152 return resetContent(
input);
int reset(const UList< StringType > &input)
Copy the input list of strings.
void clear()
Clear contents and free memory.
const char * operator[](int i) const
Return element at the given index. No bounds checking.
const char * get(int i) const
Return string element at the given index. No bounds checking.
char ** strings() const noexcept
Return the list of C-strings (ie, argv)
bool empty() const noexcept
True if the size (ie, argc) is zero.
int size() const noexcept
Return the number of C-strings (ie, argc)
Sub-ranges of a string with a structure similar to std::match_results, but without the underlying reg...
static int count(const char *const argv[])
Count the number of parameters until the first nullptr.
constexpr CStringList() noexcept
Default construct, adding content later (via reset).
static Istream & input(Istream &is, IntRange< T > &range)
~CStringList()
Destructor. Invokes clear() to free memory.
An adapter for copying a list of C++ strings into a list of C-style strings for passing to C code tha...