30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
printf("s1 = %s\n", [s1 cString]);
printf("s2 = %s\n", [s2 cString]);
printf("s3 = %s\n", [s3 cString]);
printf("s4 = %s\n", [s4 cString]);
[s1 append: [s2 cString]];
printf("s1 append s2 = %s\n", [s1 cString]);
printf("strlen(s1) = %ld, [s1 length] = %ld\n",
strlen([s1 cString]), [s1 length]);
[s1 free];
[s2 free];
[s3 free];
[s4 free];
return 0;
|
|
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
printf("s1 = %s\n", [s1 cString]);
printf("s2 = %s\n", [s2 cString]);
printf("s3 = %s\n", [s3 cString]);
printf("s4 = %s\n", [s4 cString]);
[s1 append: [s2 cString]];
printf("s1 append s2 = %s\n", [s1 cString]);
printf("strlen(s1) = %zd, [s1 length] = %zd\n",
strlen([s1 cString]), [s1 length]);
[s1 free];
[s2 free];
[s3 free];
[s4 free];
return 0;
|