MCPcopy Create free account
hub / github.com/1401199262/MemoryVirtualization / extract

Function extract

globals.cpp:20–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19
20std::string extract(std::string& values, int index, char delim = ' ') {
21 if (values.length() == 0)
22 return std::string("");
23
24 std::vector<std::string> x = split(values, delim);
25 try {
26 return x.at(index);
27 }
28 catch (const std::out_of_range& e) {
29 return std::string(""); // Ҫ�Ƿ��ʳ�����Χ��Ԫ�أ����Ǿͷ��ؿմ�
30 }
31}
32
33#pragma warning(disable:4996)
34

Callers

nothing calls this directly

Calls 1

splitFunction · 0.85

Tested by

no test coverage detected