sus-regex/amogus.h

16 lines
417 B
C
Raw Normal View History

2024-04-04 20:18:10 +03:00
// int entry(...)
//
// Parse regex. Find matching string.
// If found:
// call callback(
// matched string (only valid before callback return),
// length of the string including NUL delimiter,
// data passed in the data argument
// )
// return 0
// Else:
// return 1
typedef void (entry_callback)(char* match, int size, void* data);
int entry(char* regex, entry_callback *callback, void *data);