Add character token method to split it from a given index

This commit is contained in:
iska
2015-03-07 00:43:00 +01:00
parent 3ff1044c6d
commit a2fcdf834b
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -20,5 +20,6 @@
- (BOOL)isWhitespaceToken;
- (HTMLCharacterToken *)tokenByRetainingLeadingWhitespace;
- (HTMLCharacterToken *)tokenByTrimmingLeadingWhitespace;
- (HTMLCharacterToken *)tokenByTrimmingFormIndex:(NSUInteger)index;
@end
+5
View File
@@ -59,6 +59,11 @@
return nil;
}
- (HTMLCharacterToken *)tokenByTrimmingFormIndex:(NSUInteger)index
{
return [[HTMLCharacterToken alloc] initWithString:[_characters substringFromIndex:index]];
}
#pragma mark - NSObject
- (BOOL)isEqual:(id)other