MCPcopy Create free account
hub / github.com/Tablecruncher/tablecruncher / apiGetString

Method apiGetString

src/macro.cpp:117–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115
116
117duk_ret_t Macro::apiGetString(duk_context *context) {
118 duk_idx_t numArgs = duk_get_top(context);
119 if( numArgs == 2 ) {
120 if( duk_get_type(context, 0) == DUK_TYPE_NUMBER && duk_get_type(context, 1) == DUK_TYPE_NUMBER ) {
121 duk_uint_t row = duk_to_uint(context, 0);
122 duk_uint_t col = duk_to_uint(context, 1);
123 std::string cell_str = macro.table->getCell(row, col);
124 duk_push_string(context, cell_str.c_str());
125 return 1;
126 }
127 }
128 return 0;
129}
130duk_ret_t Macro::apiGetInt(duk_context *context) {
131 duk_idx_t numArgs = duk_get_top(context);
132 if( numArgs == 2 ) {

Callers

nothing calls this directly

Calls 1

getCellMethod · 0.80

Tested by

no test coverage detected