I make a comparison of two strings which are obviously identical. Unfortunately my if clause doesn′t work as expected:
NSLog(@"%@ == %@ ?",strippedString1,strippedString2);
if (strippedString1 == strippedString2) {
[_newBuild setTextColor: [NSColor greenColor] ];
[_OldBuild setTextColor: [NSColor greenColor] ];
}
This is my NSLog output: Build: 2A12-046 == Build: 2A12
Even a byte by byte comparison says both strings are identical:
Any clues ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…