Archived
1

Added Some Helpers

This commit is contained in:
Kim Wittenburg
2014-09-07 16:46:50 +02:00
parent 205de83a28
commit 02d7398ee2
2 changed files with 39 additions and 0 deletions

View File

@@ -116,6 +116,20 @@
return [self.location isEqual:aRangePath.location] && self.length == aRangePath.length;
}
- (NSString *)description
{
NSMutableString *description = [[NSMutableString alloc] initWithString:@"MPRangePath<location="];
if (self.location.length > 0) {
[description appendFormat:@"%ld", [self.location indexAtPosition:0]];
}
for (NSUInteger position = 1; position < self.location.length; position ++) {
[description appendFormat:@",%ld", [self.location indexAtPosition:position]];
}
[description appendFormat:@" length=%ld", self.length];
[description appendString:@">"];
return description.copy;
}
#pragma mark - NSCopying
- (id)copyWithZone:(NSZone *)zone