×

Discussion Board

Results 1 to 6 of 6
  1. #1
    chishti.hameed
    Guest

    comparing string???

    i'm reading file data this way:

    TBuf8<6> readBuf;
    myFile.Read(0,readBuf);

    readBuf will have either "YES" or "NO" Q is how do i check/compare what readBuff has???
    did try to use different ways but always errors regarding type conversion

    plz help

  2. #2
    Regular Contributor
    Join Date
    Jun 2004
    Posts
    86
    try:

    _LIT8(KYes, "YES");
    if( readBuf.Find(KYes) != KErrNotFound)
    {
    //found "YES"
    }
    else
    {
    //found "NO"
    }

    is this what you wanted to do?

  3. #3
    chishti.hameed
    Guest

    :-)

    yeah its what i need

    i was trying to find smth like "Find()" but couldnt
    find in sdk for TBuff.

    once again Thanks

  4. #4
    chishti.hameed
    Guest

    ..

    btw is there any article somewhere which does explain/show
    all these type conversion samples like

    int to string
    string to int

    e.t.c.....
    ?

  5. #5
    Regular Contributor
    Join Date
    Jun 2004
    Posts
    86
    int to string, you can try

    TInt number;
    TBuf<12> string;
    string.AppendNum(number);

    string to int, i forgot... but maybe you could check TLex in SDK doc.

  6. #6
    chishti.hameed
    Guest

    :)

    BUNDLE OF THANKS :-)
    I'm new with symbian , thanks for your help

    could you please look at my question in SymbianC++>UI>

    may be you could have help me with that Q too? :P

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×