Skip to content

Commit

Permalink
SO lib
Browse files Browse the repository at this point in the history
  • Loading branch information
GerbenAaltink committed Oct 2, 2024
1 parent 1d08e0c commit 846726b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Binary file added librmatch.so
Binary file not shown.
20 changes: 20 additions & 0 deletions rmatch.so.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include "rmatch.h"
#include "bmatch.h"

/*
* Rmatcher with offset support
* Returns -1 if not found
* Returns offset if found
*/
extern int matchr(char * expr, char * str){
rmatch_t *result = rmatch(expr,str);
return result->valid ? result->start : -1;
}
/*
* Original beautiful code matcher with offset support
* Returns -1 if not found
* Returns offset if found
*/
extern int matchb(char * expr, char * str){
return rbmatch(expr,str);
}

0 comments on commit 846726b

Please sign in to comment.