9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
* the packaging of this file.
*/
#import <wchar.h>
#import "OFConstWideString.h"
@implementation OFConstWideString
+ new:(const wchar_t*)wstr
{
return [[OFConstWideString alloc] init:wstr];
}
- init
{
return [self init:NULL];
}
- init:(const wchar_t*)wstr
{
if ((self = [super init])) {
if (wstr == NULL) {
length = 0;
wstring = NULL;
} else {
length = wcslen(wstr);
|
|
|
|
|
|
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
* the packaging of this file.
*/
#import <wchar.h>
#import "OFConstWideString.h"
@implementation OFConstWideString
+ new: (const wchar_t*)wstr
{
return [[OFConstWideString alloc] init: wstr];
}
- init
{
return [self init: NULL];
}
- init: (const wchar_t*)wstr
{
if ((self = [super init])) {
if (wstr == NULL) {
length = 0;
wstring = NULL;
} else {
length = wcslen(wstr);
|