Hi,
From the string Field Value(comma separated Value) I want to get each word.
Ex: String Field Value: Pending,Process,Finish
I want to get each word by word
Pending
Process
Finish
I want to store in different variables.
Thanks in advance
sunil
This code in this may help you
static void commaSeperateJob(Args _args)
{
str s= “kranthi,kumar,Myname”;
int i=1,j;
str s1,s2;
container c;
;
j = strlen(s);
for(i = 1; i <= j ; i++)
{
if(substr(s,i,1) != “,”)
s1 += substr(s,i,1);
if(i>1 && substr(s,i,1) == “,” || i == j)
{
c = c + [s1];
s1 = “”;
}
}
conview(c);
pause;
}
cojacs
3
Another way to split you file is to use str2con();
static void Job(Args _args)
{
container c;
str s;
;
s= “kranthi,kumar,Myname”;
c = str2con(s,",");
conview(c);
}
stohi
4
I suggest to look here: http://dynamicsuser.net/forums/p/138838/138838.aspx
it is important to put this–> asciiIo.inFieldDelimiter(";");