CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2012
    Location
    India
    Posts
    193

    Simple query about String comparison ..

    Hi ,

    I am using Unicode in my MFC SDI project.

    I need String Comparison.

    I have used functions : _tcsncmp and _tcslen.

    The program works fine.

    I want to ask is there any other method to compare strings ?

  2. #2
    2kaud's Avatar
    2kaud is online now Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,822

    Re: Simple query about String comparison ..

    Have a look in the 'See Also' section at the end of
    http://msdn.microsoft.com/en-us/library/eywx8zcx.aspx
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  3. #3
    Join Date
    Jan 2012
    Location
    India
    Posts
    193

    Re: Simple query about String comparison ..

    Thanks 2kaud sir .. Have read and studied it.

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Simple query about String comparison ..

    Quote Originally Posted by new_2012 View Post
    Hi ,
    I am using Unicode in my MFC SDI project.
    I need String Comparison.
    I have used functions : _tcsncmp and _tcslen.
    ...
    I want to ask is there any other method to compare strings ?
    If you are using MFC, why do you ignore CString class?
    Victor Nijegorodov

  5. #5
    Join Date
    Jan 2014
    Posts
    1

    Lightbulb Re: Simple query about String comparison ..

    This code can be used to change the color of the date in Crystal Report 8.0
    if {RepTab.RTGSDate} = DateTime (1900, 01, 01,00, 00, 00) then color(255,255,255) else color(44,24,168)

  6. #6
    2kaud's Avatar
    2kaud is online now Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,822

    Re: Simple query about String comparison ..

    Quote Originally Posted by zahidcoder View Post
    This code can be used to change the color of the date in Crystal Report 8.0
    if {RepTab.RTGSDate} = DateTime (1900, 01, 01,00, 00, 00) then color(255,255,255) else color(44,24,168)
    And this relates to c++ string comparision how?????
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured