#import <Foundation/Foundation.h>
int main() {
NSAutoreleasePool *pool = [NSAutoreleasePool new];
NSString *car = @"Porsche Boxster";
if ([car isEqualToString:@"Porsche Boxster"]) {
NSLog(@"El carro es un Porsche Boxster");
}
if ([car hasPrefix:@"Porsche"]) {
NSLog(@"El carro comienza con Porsche");
}
if ([car hasSuffix:@"Carrera"]) {
NSLog(@"El carro termina en Carrera");
}
[pool drain];
return 0;
}
I2ltcG9ydCA8Rm91bmRhdGlvbi9Gb3VuZGF0aW9uLmg+CgppbnQgbWFpbigpIHsKCU5TQXV0b3JlbGVhc2VQb29sICpwb29sID0gW05TQXV0b3JlbGVhc2VQb29sIG5ld107CglOU1N0cmluZyAqY2FyID0gQCJQb3JzY2hlIEJveHN0ZXIiOwogICAgaWYgKFtjYXIgaXNFcXVhbFRvU3RyaW5nOkAiUG9yc2NoZSBCb3hzdGVyIl0pIHsKICAgICAgICBOU0xvZyhAIkVsIGNhcnJvIGVzIHVuIFBvcnNjaGUgQm94c3RlciIpOwogICAgfQogICAgaWYgKFtjYXIgaGFzUHJlZml4OkAiUG9yc2NoZSJdKSB7CiAgICAgICAgTlNMb2coQCJFbCBjYXJybyBjb21pZW56YSBjb24gUG9yc2NoZSIpOwogICAgfQogICAgaWYgKFtjYXIgaGFzU3VmZml4OkAiQ2FycmVyYSJdKSB7CiAgICAgICAgTlNMb2coQCJFbCBjYXJybyB0ZXJtaW5hIGVuIENhcnJlcmEiKTsKICAgIH0KCVtwb29sIGRyYWluXTsKCXJldHVybiAwOwp9Cgo=