MCPcopy Create free account
hub / github.com/SOUI2/soui / SplitString

Function SplitString

SOUI/include/helper/SplitString.h:6–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4{
5 template<class T,class TC>
6 size_t SplitString(const T &str, TC cSep ,SArray<T> & strLst)
7 {
8 int nBegin=0;
9 int nEnd=0;
10 while(nEnd!=str.GetLength())
11 {
12 if(str[nEnd]==cSep)
13 {
14 if(nEnd>nBegin)
15 {
16 strLst.Add(str.Mid(nBegin,nEnd-nBegin));
17 }
18 nBegin=nEnd+1;
19 }
20 nEnd++;
21 }
22 if(nEnd>nBegin)
23 {
24 strLst.Add(str.Mid(nBegin,nEnd-nBegin));
25 }
26 return strLst.GetCount();
27 }
28
29 typedef SArray<SStringA> SStringAList;
30 typedef SArray<SStringW> SStringWList;

Callers 15

StrPos2ItemPosMethod · 0.50
OnAttrPosMethod · 0.50
OnAttrSizeMethod · 0.50
OnAttrSizeMethod · 0.50
OnAttrExtendMethod · 0.50
OnAttrSizeMethod · 0.50
OnInitDialogMethod · 0.50
OnAttrStateMapMethod · 0.50
OnAttrRadiusMethod · 0.50
_ParseLayoutSize4Method · 0.50
OnAttrViewSizeMethod · 0.50
GetFontMethod · 0.50

Calls 4

GetLengthMethod · 0.45
AddMethod · 0.45
MidMethod · 0.45
GetCountMethod · 0.45

Tested by

no test coverage detected