- additional test for matchgroup
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include <regex.h>
|
#include <regex.h>
|
||||||
|
|
||||||
#define XREGEX_IS_MATCHGROUP(groupArray, groupIndex) (groupArray[groupIndex].rm_so < groupArray[groupIndex].rm_eo)
|
#define XREGEX_IS_MATCHGROUP(groupArray, groupIndex) (groupArray[groupIndex].rm_so < groupArray[groupIndex].rm_eo && 0 <= groupArray[groupIndex].rm_so)
|
||||||
#define XREGEX_SIZEOF_MATCHGROUP(groupArray, groupIndex) (size_t) (groupArray[groupIndex].rm_eo - groupArray[groupIndex].rm_so)
|
#define XREGEX_SIZEOF_MATCHGROUP(groupArray, groupIndex) (size_t) (groupArray[groupIndex].rm_eo - groupArray[groupIndex].rm_so)
|
||||||
|
|
||||||
#endif /* EXT_XREGEX_H_ */
|
#endif /* EXT_XREGEX_H_ */
|
||||||
|
Reference in New Issue
Block a user