Template Function ADS::wordBreak

Function Documentation

template<class F>
std::optional<std::vector<std::string>> ADS::wordBreak(const std::string &s, F &&lookup, std::size_t longest = std::string::npos, long *lookups = nullptr)

the words of s, if it is a sequence of words, by the lookup( word ) of a dictionary; the lookups made go to *lookups, if given

Post:

the words joined give s