30inline char* Foam::CStringList::stringCopy(
char* dest,
const char* src)
32 dest = std::copy_n(src, (src ? strlen(src) : 0), dest);
38inline char* Foam::CStringList::stringCopy(
char *dest, std::string_view src)
40 dest = std::copy_n(src.data(), src.size(), dest);
46inline char* Foam::CStringList::stringCopy(
char *dest,
const std::string& src)
48 dest = std::copy_n(src.data(), src.size(), dest);
83 std::initializer_list<const char* const> input
92template<
class StringType>
111 const std::vector<std::string_view>& input
140 return std::string_view(data_, nbytes_);
164 return &(argv_[start]);
An adapter for copying a list of C++ strings into a list of C-style strings for passing to C code tha...
~CStringList()
Destructor. Invokes clear() to free memory.
constexpr CStringList() noexcept
Default construct, adding content later (via reset).
static int count(const char *const argv[])
Count the number of parameters until the first nullptr.
char ** strings() const noexcept
Return the list of C-strings (ie, argv).
int reset(std::initializer_list< const char *const > input)
Copy the input list of C-strings.
CStringList(const CStringList &)=delete
No copy construct.
std::string_view view() const
The flattened character content, with interspersed nul-chars.
void clear()
Clear contents and free memory.
Sub-ranges of a string with a structure similar to std::match_results, but without the underlying reg...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
limits reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL))