16 lines
392 B
C
16 lines
392 B
C
#define EV_STR_IMPLEMENTATION
|
|
#include "ev_str.h"
|
|
|
|
#include <assert.h>
|
|
|
|
int main(void)
|
|
{
|
|
evstring text = evstr("Hello, this is me saying `Hello` like someone who says 'Hello'");
|
|
|
|
assert(evstring_findAll(text, evstr("Hello"), NULL) == 3);
|
|
assert(evstring_findAll(evstr("abc"), evstr("abc"), NULL) == 1);
|
|
assert(evstring_findAll(evstr("abcx"), evstr("abc"), NULL) == 1);
|
|
|
|
return 0;
|
|
}
|