src/core/SearchWord.h
SearchWord [Module]
Description
The SearchWord module provides functionality to search for specific keywords within
post bodies or text content of parsed XML data.
Functions
std::vector<PostMatch> searchPostsByWord(const std::string& xmlContent, const std::string& word)
Searches posts in the XML content for those containing the specified
word (case-insensitive).
Parameters
- xmlContent: The raw XML string.
- word: The word to search for.
Vector of PostMatch structures containing matched posts.
void printMatches(const std::vector<PostMatch>& matches)
Prints the search results to the console.