32 template<
class ListType>
33 int Foam::CStringList::resetContent(
const ListType&
input)
46 for (
const auto& str :
input)
48 nbytes_ += str.length() + 1;
52 argv_ =
new char*[
input.size()+1];
53 data_ =
new char[nbytes_+1];
57 for (
const auto& str :
input)
59 char *next = stringCopy(argv_[argc_], str);
60 argv_[++argc_] = next;
63 argv_[argc_] =
nullptr;
71 template<
class StringType>
77 for (
int i=0; i < argc; ++i)
86 template<
class StringType>
90 return asList<StringType>(
count(argv), argv);
void clear()
Clear contents and free memory.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
static Istream & input(Istream &is, IntRange< T > &range)
static List< StringType > asList(int argc, const char *const argv[])
Create a list from argc/argv parameters.