MCPcopy Create free account
hub / github.com/BoevaLab/FREEC / split

Function split

src/myFunc.cpp:47–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47unsigned int split(char* str_ori, char delim, char* elems[])
48{
49 const char* str = str_ori;
50 unsigned int last_jj = 0;
51 unsigned int jj = 0;
52 unsigned int elem_cnt = 0;
53 char c;
54 for (; c = *str++; ++jj) {
55 if (c == delim) {
56 str_ori[jj] = 0;
57 elems[elem_cnt++] = &str_ori[last_jj];
58 last_jj = jj+1;
59 }
60 }
61 elems[elem_cnt++] = &str_ori[last_jj];
62 return elem_cnt;
63}
64
65std::vector<std::string> &split(const std::string &s, char delim, std::vector<std::string> &elems) {
66 std::stringstream ss(s);

Callers 15

readChrNamesInBedFunction · 0.85
readFileWithGenomeInfoFunction · 0.85
getReadNumberFromPileupFunction · 0.85
getBAFinfoFunction · 0.85
findSmallestSuffixFunction · 0.85
getELANDinfoFunction · 0.85
getSAMinfoFunction · 0.85
GenomeDensityMethod · 0.85
processSNPLineMethod · 0.85
processPileUPLineMethod · 0.85
readCGprofileMethod · 0.85
readCopyNumberMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected