51template<
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;
79 std::string::size_type
length()
const
81 std::string::size_type len = 0;
83 for (
const auto& elem : *
this)
94 const typename StringType::const_iterator&
b,
95 const typename StringType::const_iterator&
e
101 range.matched =
true;
103 this->push_back(
range);
108 auto first() const -> decltype(this->front())
110 return this->front();
115 auto last() const -> decltype(this->back())
121 StringType
str(
size_t pos)
const
123 return (*
this)[
pos].str();
Sub-ranges of a string with a structure similar to std::match_results, but without the underlying reg...
SubStrings()=default
Default construct.
void append(const typename StringType::const_iterator &b, const typename StringType::const_iterator &e)
Append sub-string defined by begin/end iterators.
std::string::size_type length() const
The total string length of all sub-elements.
auto last() const -> decltype(this->back())
StringType str(size_t pos) const
Get element at pos, converted to a string type.
typename std::sub_match< typename StringType::const_iterator > value_type
The element type.
typename StringType::const_iterator string_iterator
The const_iterator for the underlying string type.
auto first() const -> decltype(this->front())
dimensionedScalar pos(const dimensionedScalar &ds)