|  | ATLAS Offline Software
    | 
Utility object for parsing a string into tokens and returning them as a variety of types. More...
#include <StringParse.h>
| Public Member Functions | |
| StringParse (const std::string &input) | |
| Constructor, taking a string of whitespace-separated tokens.  More... | |
| template<typename T > | |
| T | piece (size_t num) const | 
| Templated function to get the num'th token as any numeric type.  More... | |
| template<> | |
| std::string | piece (size_t num) const | 
| Function to get the num'th token as a string.  More... | |
| Public Attributes | |
| T | elements | 
| STL member.  More... | |
Utility object for parsing a string into tokens and returning them as a variety of types.
This code is used to parse a string, tokenising space-separated parts into component 'pieces'.
Methods can then be called to
Note that the 'num' index used to retrieve the pieces starts at 1, not the C-conventional 0.
Definition at line 33 of file StringParse.h.
| 
 | inline | 
Constructor, taking a string of whitespace-separated tokens.
Definition at line 37 of file StringParse.h.
| 
 | inline | 
Templated function to get the num'th token as any numeric type.
https://en.cppreference.com/w/cpp/utility/from_chars
Definition at line 44 of file StringParse.h.
| std::string StringParse::piece | ( | size_t | num | ) | const | 
Function to get the num'th token as a string.
Definition at line 57 of file StringParse.h.
| 
 | inherited | 
STL member.
 1.8.18
 1.8.18