mirror of
https://github.com/kiwix/libkiwix.git
synced 2026-09-14 06:30:55 -04: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:
1 parent
aa1f73472d
commit
717c39f2ef
3 files changed
+34
-1
No files matched your search
@@ -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