Comparing the values of two nsstrings

Posted by user1776234 on Stack Overflow See other posts from Stack Overflow or by user1776234
Published on 2012-11-06T02:06:05Z Indexed on 2012/11/06 5:00 UTC
Read the original article Hit count: 106

So I have been trying to compare two NSStrings in xcode. However, it is not working. What am I doing wrong?

NSString Prog are characters that are xml parsed from mysql

   char *cStr = "YES";
        NSString *str3 = [NSString stringWithUTF8String:cStr];
        if ([str3 isEqualToString:prog]) {
             [switch1 setOn:YES animated:YES];
        }
        else {
             [switch1 setOn:NO animated:YES];
        }

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about ios