MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / ProcessString

Function ProcessString

sourcecommon/utils.cpp:16–44  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

14
15//---------------------------------------------------------------------------
16void ProcessString(char * s, char comment, char * del)
17{
18 bool DelSpace = true;
19 int i, j;
20 for(i=0,j=0; s[i]; i++)
21 {
22 if( s[i]=='\n' || s[i]=='\r' || s[i]==comment )
23 {
24 break;
25 }
26 else if( s[i]=='\"' )
27 {
28 DelSpace = !DelSpace;
29 //continue;
30 }
31 else if( s[i]==' ' || s[i]=='\t' )
32 {
33 if( DelSpace ) continue;
34 }
35
36 // ������ �������, ������������� � ������ del
37 if( del )
38 if( strchr(del, s[i]) )
39 continue;
40
41 s[j++] = s[i];
42 }
43 s[j] = 0;
44}
45//---------------------------------------------------------------------------
46// ������ �������, ������������� � ������ del
47void DeleteCharactersFromString(char * s, char * del)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected