hx::Object *runObject(CppiaCtx *ctx) { String val = strVal->runString(ctx); BCR_CHECK; String separator = a0->runString(ctx); BCR_CHECK; return val.split(separator).mPtr; }
int runInt(CppiaCtx *ctx) { String val = strVal->runString(ctx); BCR_CHECK; String s = sought->runString(ctx); BCR_CHECK; hx::Object *first = start->runObject(ctx); BCR_CHECK; if (LAST) return val.lastIndexOf(s,first); else return val.indexOf(s,first); }