diff --git a/HTMLKit/HTMLCharacterToken.h b/HTMLKit/HTMLCharacterToken.h
index 56ad1ad..be3d4ee 100644
--- a/HTMLKit/HTMLCharacterToken.h
+++ b/HTMLKit/HTMLCharacterToken.h
@@ -20,5 +20,6 @@
- (BOOL)isWhitespaceToken;
- (HTMLCharacterToken *)tokenByRetainingLeadingWhitespace;
- (HTMLCharacterToken *)tokenByTrimmingLeadingWhitespace;
+- (HTMLCharacterToken *)tokenByTrimmingFormIndex:(NSUInteger)index;
@end
diff --git a/HTMLKit/HTMLCharacterToken.m b/HTMLKit/HTMLCharacterToken.m
index 257fb2e..2548558 100644
--- a/HTMLKit/HTMLCharacterToken.m
+++ b/HTMLKit/HTMLCharacterToken.m
@@ -59,6 +59,11 @@
return nil;
}
+- (HTMLCharacterToken *)tokenByTrimmingFormIndex:(NSUInteger)index
+{
+ return [[HTMLCharacterToken alloc] initWithString:[_characters substringFromIndex:index]];
+}
+
#pragma mark - NSObject
- (BOOL)isEqual:(id)other