MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / SplitValues

Function SplitValues

data/dictionary/DictionaryPhraseSegmentationTest.cpp:54–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52};
53
54std::vector<std::string> SplitValues(const std::string& values) {
55 std::vector<std::string> split;
56 size_t start = 0;
57 while (start <= values.size()) {
58 const size_t end = values.find(' ', start);
59 split.push_back(values.substr(start, end - start));
60 if (end == std::string::npos) {
61 break;
62 }
63 start = end + 1;
64 }
65 return split;
66}
67
68std::vector<STPhraseValue> LoadSTPhraseValues(const std::string& path,
69 const std::string& source) {

Callers 1

LoadSTPhraseValuesFunction · 0.70

Calls 4

findMethod · 0.80
sizeMethod · 0.45
push_backMethod · 0.45
substrMethod · 0.45

Tested by

no test coverage detected