mirror of
https://github.com/kiwix/libkiwix.git
synced 2026-01-22 21:28:10 -05:00
Better ExtractFromString
- Throw a exception if we cannot extract from string. (We throw the same exception as `std::sto*`) - Add a specialization to extract string from string - Add some unit test
This commit is contained in:
@@ -405,3 +405,8 @@ std::vector<std::string> kiwix::getTitleVariants(const std::string& title) {
|
||||
variants.push_back(kiwix::toTitle(title));
|
||||
return variants;
|
||||
}
|
||||
|
||||
template<>
|
||||
std::string kiwix::extractFromString(const std::string& str) {
|
||||
return str;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user