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

Function SplitValues

data/dictionary/DictionaryPhraseCharacterDependencyTest.cpp:37–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35};
36
37std::vector<std::string> SplitValues(const std::string& values) {
38 std::vector<std::string> split;
39 size_t start = 0;
40 while (start <= values.size()) {
41 const size_t end = values.find(' ', start);
42 split.push_back(values.substr(start, end - start));
43 if (end == std::string::npos) {
44 break;
45 }
46 start = end + 1;
47 }
48 return split;
49}
50
51std::vector<std::string> SplitCharacters(const std::string& text) {
52 std::vector<std::string> characters;

Callers 1

LoadEntriesFunction · 0.70

Calls 4

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

Tested by

no test coverage detected