59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
if (!strcmp([[s1 reverse] cString], "321tset"))
puts("Reversed s1 is expected string! GOOD!");
else {
puts("Reversed s1 is NOT the expected string!");
return 1;
}
[s1 free];
[s2 free];
[s3 free];
[s4 free];
return 0;
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
if (!strcmp([[s1 reverse] cString], "321tset"))
puts("Reversed s1 is expected string! GOOD!");
else {
puts("Reversed s1 is NOT the expected string!");
return 1;
}
if (!strcmp([[s1 upper] cString], "321TSET"))
puts("Upper s1 is expected string! GOOD!");
else {
puts("Upper s1 is NOT expected string!");
return 1;
}
if (!strcmp([[s1 lower] cString], "321tset"))
puts("Lower s1 is expected string! GOOD!");
else {
puts("Lower s1 is NOT expected string!");
return 1;
}
[s1 free];
[s2 free];
[s3 free];
[s4 free];
return 0;
|