MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / string_split

Function string_split

subprojects/llama.cpp/common/common.h:659–671  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

657
658template<class T>
659static std::vector<T> string_split(const std::string & str, char delim) {
660 static_assert(!std::is_same<T, std::string>::value, "Please use the specialized version for std::string");
661 std::vector<T> values;
662 std::istringstream str_stream(str);
663 std::string token;
664 while (std::getline(str_stream, token, delim)) {
665 T value;
666 std::istringstream token_stream(token);
667 token_stream >> value;
668 values.push_back(value);
669 }
670 return values;
671}
672
673template<>
674std::vector<std::string> string_split<std::string>(const std::string & input, char separator)

Callers 6

_visit_patternMethod · 0.70
resolve_refsMethod · 0.70
mainFunction · 0.50
test_example_nativeFunction · 0.50
test_example_qwen3_coderFunction · 0.50

Calls 1

push_backMethod · 0.45

Tested by 3

mainFunction · 0.40
test_example_nativeFunction · 0.40
test_example_qwen3_coderFunction · 0.40