35 #ifndef Foam_SubStrings_H 36 #define Foam_SubStrings_H 51 template<
class StringType>
54 public std::vector<std::sub_match<typename StringType::const_iterator>>
62 typename std::sub_match<typename StringType::const_iterator>;
66 typename StringType::const_iterator;
77 for (
const auto& elem : *
this)
86 StringType
str(
size_t pos)
const 88 return (*
this)[
pos].str();
94 const typename StringType::const_iterator&
b,
95 const typename StringType::const_iterator&
e 101 range.matched =
true;
103 this->push_back(
range);
110 if (
n >= this->size())
116 this->
resize(this->size() -
n);
124 if (
n >= this->size())
131 for (
size_t src =
n, dst = 0; src < this->size(); ++src, ++dst)
133 (*this)[dst] = (*this)[src];
135 this->
resize(this->size() -
n);
patchWriters resize(patchIds.size())
typename std::sub_match< typename StringType::const_iterator > value_type
The element type.
void pop_back(size_t n=1)
Reduce size by 1 or more elements. Can be called on an empty list.
std::string::size_type length() const
The total string length of all sub-elements.
dimensionedScalar pos(const dimensionedScalar &ds)
const dimensionedScalar e
Elementary charge.
StringType str(size_t pos) const
Retrieve element at pos, converted to a string type.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
graph_traits< Graph >::vertices_size_type size_type
void append(const typename StringType::const_iterator &b, const typename StringType::const_iterator &e)
Append sub-string defined by begin/end iterators.
typename StringType::const_iterator string_iterator
The const_iterator for the underlying string type.
void pop_front(size_t n=1)
Reduce size by 1 or more elements (from the front). Can be called on an empty list.