5 void cutItem( char * in
,char * out
,char sep
,int num
)
8 for ( c
=0,n
=0,i
=0;i
<strlen( in
);i
++ )
10 if ( in
[i
] == sep
) n
++;
11 if ( n
>= num
&& in
[i
] != sep
) out
[c
++]=in
[i
];
12 if ( n
>= num
&& in
[i
+1] == sep
) { out
[c
]=0; return; }
17 int cutItemToInt( char * in
,char sep
,int num
)
20 cutItem( in
,tmp
,sep
,num
);
24 float cutItemToFloat( char * in
,char sep
,int num
)
27 cutItem( in
,tmp
,sep
,num
);
31 void cutChunk( char * in
,char * s1
)
33 cutItem( in
,s1
,'=',0 );
34 memmove( in
,strchr( in
,'=' )+1,strlen( in
) - strlen( s1
) );