ObjXMPP  Diff

Differences From Artifact [5da0eb2fdc]:

To Artifact [a2663297e0]:


54
55
56
57
58
59
60
61

62
63
64
65
66
67
68
69


70
71
72


73
74
75
76
77
78
79
54
55
56
57
58
59
60

61

62
63
64
65
66


67
68
69


70
71
72
73
74
75
76
77
78







-
+
-





-
-
+
+

-
-
+
+








	nodesep = [str indexOfFirstOccurrenceOfString: @"@"];
	resourcesep = [str indexOfFirstOccurrenceOfString: @"/"];

	if (nodesep == SIZE_MAX)
		[self setNode: nil];
	else
		[self setNode: [str substringFromIndex: 0
		[self setNode: [str substringWithRange: of_range(0, nodesep)]];
					       toIndex: nodesep]];

	if (resourcesep == SIZE_MAX) {
		[self setResource: nil];
		resourcesep = [str length];
	} else
		[self setResource: [str substringFromIndex: resourcesep + 1
						 toIndex: [str length]]];
		[self setResource: [str substringWithRange:
		    of_range(resourcesep + 1, [str length] - resourcesep - 1)]];

	[self setDomain: [str substringFromIndex: nodesep + 1
					 toIndex: resourcesep]];
	[self setDomain: [str substringWithRange:
	    of_range(nodesep + 1, resourcesep - nodesep - 1)]];

	return self;
}

- (void)dealloc
{
	[node release];