MCPcopy Create free account
hub / github.com/BabitMF/bmf / string_split

Function string_split

bmf/sdk/cpp_sdk/src/module_manager.cpp:37–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35#endif
36
37static void string_split(std::vector<std::string> &tokens,
38 const std::string &str, const std::string &seps) {
39 size_t j = 0;
40 for (size_t i = 0; i < str.size(); ++i) {
41 if (seps.find(str[i]) != std::string::npos) {
42 if (i > j) {
43 tokens.push_back(str.substr(j, i - j));
44 }
45 j = i + 1;
46 }
47 }
48 if (j < str.size()) {
49 tokens.push_back(str.substr(j));
50 }
51}
52
53static std::string unique_name(const ModuleInfo &info) {
54 return fmt::format("{}:{}:{}:{}", info.module_type, info.module_path,

Callers 2

resolve_from_metaMethod · 0.85
parse_entryMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected