CppiaExpr *link(CppiaModule &inData) { strVal = strVal->link(inData); sought = sought->link(inData); start = start->link(inData); return this; }
hx::Object *runObject(CppiaCtx *ctx) { String val = strVal->runString(ctx); BCR_CHECK; String separator = a0->runString(ctx); BCR_CHECK; return val.split(separator).mPtr; }
String runString(CppiaCtx *ctx) { String val = strVal->runString(ctx); BCR_CHECK; int start = a0->runInt(ctx); BCR_CHECK; Dynamic end = a1->runObject(ctx); BCR_CHECK; if (SUBSTR) return val.substr(start,end); else return val.substring(start,end); }
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); }
String runString(CppiaCtx *ctx) { String val = strVal->runString(ctx); BCR_CHECK; int idx = a0->runInt(ctx); BCR_CHECK; return val.charAt(idx); }
int runInt(CppiaCtx *ctx) { //printf("Char code at %d INT\n", CODE); String val = strVal->runString(ctx); BCR_CHECK; int idx = a0->runInt(ctx); BCR_CHECK; return val.charCodeAt(idx); }
hx::Object *runObject(CppiaCtx *ctx) { String val = strVal->runString(ctx); BCR_CHECK; int idx = a0->runInt(ctx); BCR_CHECK; if (CODE) return val.charCodeAt(idx).mPtr; else return Dynamic(val.charAt(idx)).mPtr; }
int runInt(CppiaCtx *ctx) { //printf("Char code at %d INT\n", CODE); String val = strVal->runString(ctx); BCR_CHECK; int idx = a0->runInt(ctx); BCR_CHECK; if (AS_INT) return (int)( ((unsigned char *)val.__s) [idx]); else return val.charCodeAt(idx); }
hx::Object *runObject(CppiaCtx *ctx) { String val = strVal->runString(ctx); BCR_CHECK; int idx = a0->runInt(ctx); BCR_CHECK; if (CODE) { if (AS_INT) return Dynamic( (int)( ((unsigned char *)val.__s) [idx]) ).mPtr; else return val.charCodeAt(idx).mPtr; } else return Dynamic(val.charAt(idx)).mPtr; }
CppiaExpr *link(CppiaModule &inData) { a0 = a0->link(inData); return StringExpr::link(inData); }
CppiaExpr *link(CppiaModule &inData) { strVal = strVal->link(inData); return this; }