rtop
|
responsible for parsing strings in a line, specfied by some character separator More...
#include <rtop_utils.h>
Public Member Functions | |
StringParser (char c) | |
StringParser constructor. Instantiates a StringParser object with provided separator character. More... | |
void | operator<< (std::string) |
reads in a line and stores parsed string into StringParser::words More... | |
std::vector< std::string > | Words () const |
returns a vector of parsed strings stored in StringParser::words More... | |
int | size () const |
returns size of StringParser::words vector More... | |
void | clear () |
clears StringParser::words vector More... | |
void | setSeparator (char c) |
sets separator character More... | |
Private Attributes | |
char | sep |
character separator More... | |
std::vector< std::string > | words |
stores the parsed strings More... | |
int | sz |
size of words More... | |
responsible for parsing strings in a line, specfied by some character separator
provides API to read in a line string, specify separator and accessing the parsed strings
Definition at line 55 of file rtop_utils.h.
|
inline |
StringParser constructor. Instantiates a StringParser object with provided separator character.
Definition at line 66 of file rtop_utils.h.
|
inline |
clears StringParser::words vector
Definition at line 74 of file rtop_utils.h.
void rtop::StringParser::operator<< | ( | std::string | str1 | ) |
reads in a line and stores parsed string into StringParser::words
remove white space from parsed strings.
Definition at line 83 of file rtop_utils.h.
|
inline |
sets separator character
Definition at line 80 of file rtop_utils.h.
|
inline |
returns size of StringParser::words vector
Definition at line 72 of file rtop_utils.h.
|
inline |
returns a vector of parsed strings stored in StringParser::words
Definition at line 70 of file rtop_utils.h.
|
private |
character separator
Definition at line 59 of file rtop_utils.h.
|
private |
size of words
Definition at line 63 of file rtop_utils.h.
|
private |
stores the parsed strings
Definition at line 61 of file rtop_utils.h.