Hi Henk

I tried your solution, but I couldnt get it to work :(

I had to change this line from

strSub1 = MemPtrNew(StrLen(strTemp) + 1);

to

strSub1 = (Char *) MemPtrNew(StrLen(strTemp) + 1);

I dont believe that would cause any grief.


Updated code 

l_resultC = "- ME~0882644107"

Char *strSub1, *strSub2;

strSub1 = (Char *) MemPtrNew(StrLen(l_resultC) + 1);

if (strSub1)
{
StrCopy(strSub1, l_resultC);
strSub2 = StrChr(strSub1, '~');
if (strSub2)
{
    strSub2[0] = 0;
    strSub2++;
    // strSub1 has now the first substring, strSub2 the second, use it
    // here
}
MemPtrFree(strSub1);
}

I added these two alerts after your code to see what I ended up with.

    FrmCustomAlert ( 
        DebugScreenAlert , 
        "Name is", 
        strSub1, 
                NULL);

This first one has the name "- ME"

    FrmCustomAlert ( 
        DebugScreenAlert , 
        "No. is", 
        strSub2, 
                NULL);

This second one has the no "7,"

This appears to be the end of the string, but I cant understand why
the , character is there.

Do you have any idea why this is ?

Thank in advance.

NG

-- 
  ..-_|\      Nigel Grant
/   OZ  \   Uni. SA
\ _.--._ /   PO Box 185 Adelaide
         v    South Australia 5096

.) .)
http://geocities.com/ngrant_com

Smile its free

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to