Sign In/My Account | View Cart  

advertisement

AddThis Social Bookmark Button

Article:
  Strings in Cocoa: Part I
Subject:   Why not correct the wrong example
Date:   2001-07-06 09:59:28
From:   derrick
Response to: Why not correct the wrong example

The example has been corrected with a dated Editor's Note above it so we all can keep our documentation striaght.


Thanks to all who helped!


Derrick

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Why not correct the wrong example
    2001-07-06 17:06:32  briandds [View]

    Um, it's still wrong. strcmp() returns zero if the strings are identical, so the code there should be:

    if ( !strcmp(string1, string2) ) {
    // do the following code
    }

    There wasn't much substance to this particular article anyway, so I don't know that it matters.