Parser - AmayaHena/Nyx GitHub Wiki
Ctor
Parser();
USAGE: classic default ctor
Trim
std::vector<std::string> trim(File &f);
std::vector<std::string> trim(std::vector<std::string> &v);
USAGE: remove the empty lines and trailing white spaces
PARAMETER:
f: File object
v: vector of string
Parse
std::string find(const std::string &s, File &f, size_t i = 0);
std::string find(const std::string &s, const std::vector<std::string> &v, size_t i = 0)
USAGE: look for a match (s) in a File (f) or vector (v) beginning from a range (i)
PARAMETER:
s: match to look for
f: File object
v: vector of string
i: begin to look for the match from this range
std::string getRawString(const std::string &s, const char c = '\"', size_t i = 0) const;
USAGE: get a substring form (s) with between two characters (c) from a range (i)
PARAMETER:
s: string to get the substring
v: character to look for
i: begin to look for the range