sus-regex/amogus.h
2024-04-08 05:25:15 +05:00

15 lines
377 B
C

// int entry(...)
//
// Parse regex. Find matching string.
// If found:
// call callback(
// matched string (only valid until callback return),
// length of the string including NUL delimiter,
// )
// return 0
// Else:
// return ERR
typedef void(entry_callback)(char *match, int size, void *data);
int entry(char *regex, entry_callback *callback, void *data);