crawlserv++
[under development]
Application for crawling and analyzing textual content of websites.
|
Namespace for importing and exporting raw text. More...
Import and Export | |
std::queue< std::string > | importList (const std::string &content, bool skipFirstLine, bool ignoreEmpty) |
Imports a list from raw text content, with each line representing a list entry. More... | |
std::string | exportList (std::queue< std::string > &list, const std::optional< std::string > &header, bool ignoreEmpty) |
Exports a list to raw text content, with each line representing a list entry. More... | |
Namespace for importing and exporting raw text.
|
inline |
Exports a list to raw text content, with each line representing a list entry.
list | Reference to a queue containing the list entries. It will be emptied in the process, even if entries will be ignored, because they are empty. |
header | Constant reference to an optional string containing a header for the list. If given, it will be added to the beginning of the resulting content, in a separate line. |
ignoreEmpty | If true, empty list entries will not be written to the resulting raw text content, although they will still be removed from the given queue. |
References crawlservpp::Helper::Strings::join().
Referenced by crawlservpp::Main::Server::tick().
|
inline |
Imports a list from raw text content, with each line representing a list entry.
content | A constant reference to the content to be parsed as a list, each line representing a list entry. |
skipFirstLine | If true, the first line in the content will be ignored, e.g. when it contains a header for the list. |
ignoreEmpty | If true, empty lines will be ignored. |
References crawlservpp::Helper::Strings::splitToQueue().
Referenced by crawlservpp::Main::Server::tick().