8 #include "caffe2/core/common.h" 12 CAFFE2_API std::vector<std::string> split(
char separator,
const std::string&
string);
14 CAFFE2_API std::string trim(
const std::string& str);
16 CAFFE2_API
size_t editDistance(
17 const std::string& s1,
const std::string& s2,
size_t max_distance = 0);
19 CAFFE2_API
inline bool StartsWith(
const std::string& str,
const std::string& prefix) {
20 return std::mismatch(prefix.begin(), prefix.end(), str.begin()).first ==
24 CAFFE2_API
inline bool EndsWith(
25 const std::string& full,
26 const std::string& ending) {
27 if (full.length() >= ending.length()) {
30 full.compare(full.length() - ending.length(), ending.length(), ending));
36 CAFFE2_API int32_t editDistanceHelper(
const char* s1,
40 std::vector<size_t> ¤t,
41 std::vector<size_t> &previous,
42 std::vector<size_t> &previous1,
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...