StringZilla
StringZilla copied to clipboard
Initial nodejs string wrap
I've created a Str object wrapper for Node.js
const a = new stringzilla.Str('hello world');
const b = new stringzilla.Str('hi');
const result_1 = a.count(b);
And implemented a few functions with tests.
{"indexOf", NULL, str_find, NULL, NULL, NULL, napi_default, NULL},
{"find", NULL, str_find, NULL, NULL, NULL, napi_default, NULL},
{"rfind", NULL, str_rfind, NULL, NULL, NULL, napi_default, NULL},
{"startswith", NULL, str_startswith, NULL, NULL, NULL, napi_default, NULL},
{"endswith", NULL, str_endswith, NULL, NULL, NULL, napi_default, NULL},
{"count", NULL, str_count, NULL, NULL, NULL, napi_default, NULL}