35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
+
+
+
+
+
+
-
+
|
+ JIDWithString: (OFString*)str
{
return [[[self alloc] initWithString: str] autorelease];
}
- initWithString: (OFString*)str
{
size_t nodesep, resourcesep;
self = [super init];
if (str == nil) {
[self release];
return nil;
}
size_t nodesep, resourcesep;
nodesep = [str indexOfFirstOccurrenceOfString: @"@"];
resourcesep = [str indexOfFirstOccurrenceOfString: @"/"];
if (nodesep == SIZE_MAX)
[self setNode: nil];
else
[self setNode: [str substringFromIndex: 0
|