Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add OnigRegexp-captureCount method

  • Loading branch information...
commit f4534a2601186513b6bfae5fcb5ba6df58b3c161 1 parent 5a002e7
@nathansobo nathansobo authored committed
Showing with 6 additions and 0 deletions.
  1. +1 −0  framework/core/OnigRegexp.h
  2. +5 −0 framework/core/OnigRegexp.m
View
1  framework/core/OnigRegexp.h
@@ -52,6 +52,7 @@ typedef enum {
- (OnigResult*)match:(NSString*)target;
- (OnigResult*)match:(NSString*)target start:(int)start;
+- (NSUInteger)captureCount;
- (NSString*)expression;
@end
View
5 framework/core/OnigRegexp.m
@@ -236,6 +236,11 @@ - (OnigResult*)match:(NSString*)target start:(int)start
}
}
+- (NSUInteger)captureCount
+{
+ return onig_number_of_captures(_entity);
+}
+
- (NSString*)expression
{
return _expression;
Please sign in to comment.
Something went wrong with that request. Please try again.