MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / runInt

Method runInt

src/hx/cppia/StringBuiltin.cpp:187–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185 return val.charAt(idx);
186 }
187 int runInt(CppiaCtx *ctx) HXCPP_OVERRIDE
188 {
189 //printf("Char code at %d INT\n", CODE);
190 String val = strVal->runString(ctx);
191 BCR_CHECK;
192 int idx = a0->runInt(ctx);
193 BCR_CHECK;
194
195 if (AS_INT)
196 return (int)val.cca(idx);
197 else
198 return val.charCodeAt(idx);
199 }
200 hx::Object *runObject(CppiaCtx *ctx) HXCPP_OVERRIDE
201 {
202 String val = strVal->runString(ctx);

Callers 3

runStringMethod · 0.45
runStringMethod · 0.45
runObjectMethod · 0.45

Calls 2

charCodeAtMethod · 0.80
runStringMethod · 0.45

Tested by

no test coverage detected