Helper class which parses list of numbers of the following 3 forms and its combination. (i) list of integers separted by spaces, e.g. 1 3 7 14 (ii) a range of integers of the form nS-nE, e.g. 13-27 which will generate 13, 14, 15, .., 26, 27 (iii) a sequence of integers of the form nS:nE:nStep, e.g. 10:20:2 which will generate 10, 12, 14, .., 18, 20
Definition at line 860 of file PMusr.h.
bool PStringNumberList::Parse |
( |
std::string & |
errorMsg, |
|
|
bool |
ignoreFirstToken = false |
|
) |
| |
|
virtual |
Helper class which parses list of numbers of the following 3 forms and its combination. (i) list of integers separted by spaces, e.g. 1 3 7 14 (ii) a range of integers of the form nS-nE, e.g. 13-27 which will generate 13, 14, 15, .., 26, 27 (iii) a sequence of integers of the form nS:nE:nStep, e.g. 10:20:2 which will generate 10, 12, 14, .., 18, 20
- Parameters
-
errorMsg | error message |
ignoreFirstToken | if true, the first parse token will be ignored |
- Returns
- true if parse has been successful, otherwise false
Definition at line 1938 of file PMusr.cpp.
Referenced by main().