19 lines
347 B
C
19 lines
347 B
C
#define EV_STR_IMPLEMENTATION
|
|
#include "ev_str.h"
|
|
|
|
#include <assert.h>
|
|
|
|
int main(void)
|
|
{
|
|
evstring text = evstr("ab");
|
|
evstring replacement = evstr("x");
|
|
evstring query = evstr("abc");
|
|
|
|
evstring result = evstring_replaceFirst(text, query, replacement);
|
|
|
|
assert(EV_EQUAL(evstring)(&result, &text));
|
|
|
|
evstring_free(result);
|
|
return 0;
|
|
}
|