Sub-ranges of a string with a structure similar to std::match_results, but without the underlying regular expression matching. More...
Public Types | |
using | value_type = typename std::sub_match< typename StringType::const_iterator > |
The element type. More... | |
using | string_iterator = typename StringType::const_iterator |
The const_iterator for the underlying string type. More... | |
Public Member Functions | |
SubStrings ()=default | |
Default construct. More... | |
std::string::size_type | length () const |
The total string length of all sub-elements. More... | |
void | append (const typename StringType::const_iterator &b, const typename StringType::const_iterator &e) |
Append sub-string defined by begin/end iterators. More... | |
auto | first () const -> decltype(this->front()) |
auto | last () const -> decltype(this->back()) |
StringType | str (size_t pos) const |
Get element at pos, converted to a string type. More... | |
Sub-ranges of a string with a structure similar to std::match_results, but without the underlying regular expression matching.
Definition at line 51 of file SubStrings.H.
using value_type = typename std::sub_match<typename StringType::const_iterator> |
The element type.
Definition at line 60 of file SubStrings.H.
using string_iterator = typename StringType::const_iterator |
The const_iterator for the underlying string type.
Definition at line 64 of file SubStrings.H.
|
default |
Default construct.
|
inline |
The total string length of all sub-elements.
Use size() for the number elements.
Definition at line 78 of file SubStrings.H.
|
inline |
Append sub-string defined by begin/end iterators.
Definition at line 91 of file SubStrings.H.
Referenced by Foam::stringOps::split(), Foam::stringOps::splitAny(), and Foam::stringOps::splitFixed().
|
inline |
Const reference to the first element, for consistency with other OpenFOAM containers
Definition at line 107 of file SubStrings.H.
|
inline |
Const reference to the last element, for consistency with other OpenFOAM containers
Definition at line 114 of file SubStrings.H.
|
inline |
Get element at pos, converted to a string type.
Definition at line 120 of file SubStrings.H.
References Foam::pos().