13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#import <wchar.h>
#import "OFWideString.h"
int
main()
{
OFWideString *s1 = [OFWideString new:L"foo"];
OFWideString *s2 = [[OFWideString alloc] init:L""];
OFWideString *s3;
OFWideString *s4 = [OFWideString new];
printf("%p\n", [s2 append:L"bar"]);
s3 = [s1 clone];
[s4 setTo:[s2 wcString]];
wprintf(L"s1 = %S\n", [s1 wcString]);
wprintf(L"s2 = %S\n", [s2 wcString]);
wprintf(L"s3 = %S\n", [s3 wcString]);
wprintf(L"s4 = %S\n", [s4 wcString]);
[s1 append: [s2 wcString]];
|
|
|
|
|
|
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#import <wchar.h>
#import "OFWideString.h"
int
main()
{
OFWideString *s1 = [OFWideString new: L"foo"];
OFWideString *s2 = [[OFWideString alloc] init: L""];
OFWideString *s3;
OFWideString *s4 = [OFWideString new];
printf("%p\n", [s2 append: L"bar"]);
s3 = [s1 clone];
[s4 setTo: [s2 wcString]];
wprintf(L"s1 = %S\n", [s1 wcString]);
wprintf(L"s2 = %S\n", [s2 wcString]);
wprintf(L"s3 = %S\n", [s3 wcString]);
wprintf(L"s4 = %S\n", [s4 wcString]);
[s1 append: [s2 wcString]];
|