Permalink
Browse files

Add OnigRegexp-captureCount method

  • Loading branch information...
1 parent 5a002e7 commit f4534a2601186513b6bfae5fcb5ba6df58b3c161 @nathansobo nathansobo committed with Aug 7, 2012
Showing with 6 additions and 0 deletions.
  1. +1 −0 framework/core/OnigRegexp.h
  2. +5 −0 framework/core/OnigRegexp.m
@@ -52,6 +52,7 @@ typedef enum {
- (OnigResult*)match:(NSString*)target;
- (OnigResult*)match:(NSString*)target start:(int)start;
+- (NSUInteger)captureCount;
- (NSString*)expression;
@end
@@ -236,6 +236,11 @@ - (OnigResult*)match:(NSString*)target start:(int)start
}
}
+- (NSUInteger)captureCount
+{
+ return onig_number_of_captures(_entity);
+}
+
- (NSString*)expression
{
return _expression;

0 comments on commit f4534a2

Please sign in to comment.