Archived
1
This repository has been archived on 2022-08-08. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
mathpad/MathKit/NSRegularExpression+MPParsingAdditions.h
Kim Wittenburg 8f1f730358 Reorganized File Structure
Added Documentation
2014-12-12 00:39:30 +01:00

108 lines
3.8 KiB
Objective-C

//
// NSRegularExpression+MPParsingAdditions.h
// MathPad
//
// Created by Kim Wittenburg on 09.09.14.
// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
//
@interface NSRegularExpression (MPParsingAdditions)
/*!
@method firstMathInString:
@brief Returns the first match of the regular expression within the
specified string.
@discussion This is a convenience method that calls @c
-firstMatchInString:options:range:
@param string
The string to search.
@return An NSTextCheckingResult object. This result gives the overall
matched range via its range property, and the range of each
individual capture group via its rangeAtIndex: method. The range
@c {NSNotFound, 0} is returned if one of the capture groups did
not participate in this particular match.
*/
- (NSTextCheckingResult *)firstMatchInString:(NSString *)string;
/*!
@method firstMathInString:fromIndex
@brief Returns the first match of the regular expression from the
specified index in the string.
@discussion This is a convenience method that calls @c
-firstMatchInString:options:range:
@param string
The string to search.
@param start
The index from which to start searching.
@return An NSTextCheckingResult object. This result gives the overall
matched range via its range property, and the range of each
individual capture group via its rangeAtIndex: method. The range
@c {NSNotFound, 0} is returned if one of the capture groups did
not participate in this particular match.
*/
- (NSTextCheckingResult *)firstMatchInString:(NSString *)string fromIndex:(NSUInteger)start;
/*!
@method firstMathInString:options:
@brief Returns the first match of the regular expression within the
specified string.
@discussion This is a convenience method that calls @c
-firstMatchInString:options:range:
@param string
The string to search.
@param options
The matching options to use. See @c NSMatchingOptions for
possible values.
@return An NSTextCheckingResult object. This result gives the overall
matched range via its range property, and the range of each
individual capture group via its rangeAtIndex: method. The range
@c {NSNotFound, 0} is returned if one of the capture groups did
not participate in this particular match.
*/
- (NSTextCheckingResult *)firstMatchInString:(NSString *)string options:(NSMatchingOptions)options;
/*!
@method firstMathInString:fromIndex
@brief Returns the first match of the regular expression from the
specified index in the string.
@discussion This is a convenience method that calls @c
-firstMatchInString:options:range:
@param string
The string to search.
@param options
The matching options to use. See @c NSMatchingOptions for
possible values.
@param start
The index from which to start searching.
@return An NSTextCheckingResult object. This result gives the overall
matched range via its range property, and the range of each
individual capture group via its rangeAtIndex: method. The range
@c {NSNotFound, 0} is returned if one of the capture groups did
not participate in this particular match.
*/
- (NSTextCheckingResult *)firstMatchInString:(NSString *)string options:(NSMatchingOptions)options fromIndex:(NSUInteger)start;
@end