Archived Forum Post

Index of archived forum posts

Question:

return all array items in "CkStringArray"

Feb 26 '14 at 11:16

Hello

I'm using the CkString package, "split a string using a delimiter char" as follows:

const char * MOBILE_AS_CLIENT_TO_MERCHANT::SplitString(CkString dec_tkn) { const char * s; bool exceptDoubleQuoted = true; bool exceptEscaped = true; // Do not treat characters preceded with a backslash as a delimiter. bool keepEmpty = false; // Do not keep empty fields. char delimiter = ',';

CkStringArray *array = dec_tkn.split(delimiter,exceptDoubleQuoted,exceptEscaped,keepEmpty);
cout<<"\n\n\nSPLITTING THE DECRYPTED TOKEN CONTENTS, TO COMPARE THE PROVIDER'S NAME";
cout<<"\n----------------------------------------------------------------------\n";
int i;
for (i=0; i<array->get_Count(); i++)
{
    const char * e = array->getString(i);
    cout<<i<<":["<<e<<"]\n";
     }

My question is: How can i return all of the items of the array?

Best Regards. Rania