HI,
I have code where i've split the string "abc,cde,xyz" to abc cde and xyz using strtok.
Now, I want to join it by adding single quote to each tokenised value.
like 'abc','cde','xyz'.
Can anyone help me ?
Thanks,
|
Newbie Member
|
|
| 4Aug2011,13:45 | #1 |
|
HI,
I have code where i've split the string "abc,cde,xyz" to abc cde and xyz using strtok. Now, I want to join it by adding single quote to each tokenised value. like 'abc','cde','xyz'. Can anyone help me ? Thanks, |
|
Mentor
|
![]() |
| 5Aug2011,13:14 | #2 |
|
Code:
sprintf(joined_string,"'%s','%s','%s'",str1,str2,str3); |