replace boost filesystem with std filesystem; upgrade gtest and find it using cmake.

This commit is contained in:
Chunting Gu
2020-02-15 12:04:51 +08:00
parent 7e3da65e73
commit 7e7ab1c1e8
72 changed files with 233 additions and 31551 deletions
+28
View File
@@ -0,0 +1,28 @@
#ifndef WEBCC_STRING_H_
#define WEBCC_STRING_H_
#include <algorithm>
#include <iterator>
#include <sstream>
#include <string>
namespace webcc {
namespace string {
// Get a randomly generated string with the given length.
std::string RandomString(std::size_t length);
// TODO: What about std::wstring?
bool EqualsNoCase(const std::string& str1, const std::string& str2);
template <class Container>
void Split(const std::string& str, Container& cont) {
std::istringstream iss(str);
std::copy(std::istream_iterator<std::string>(iss),
std::istream_iterator<std::string>(), std::back_inserter(cont));
}
} // namespace string
} // namespace webcc
#endif // WEBCC_STRING_H_