MCPcopy Create free account
hub / github.com/DFHack/dfhack / get_next_cell

Function get_next_cell

plugins/xlsxreader.cpp:76–85  ·  view source on GitHub ↗

fills the value param with the contents of the cell in the next column cell in the current row. returns false if there are no more cells in this row.

Source from the content-addressed store, hash-verified

74// in the current row.
75// returns false if there are no more cells in this row.
76static bool get_next_cell(xlsx_sheet_handle *sheet_handle, std::string& value) {
77 char* result;
78 if (!xlsxioread_sheet_next_cell_string(sheet_handle->handle, &result)) {
79 value.clear();
80 return false;
81 }
82 value.assign(result);
83 free(result);
84 return true;
85}
86
87// internal function to extract a handle from the first stack param
88static void * get_xlsxreader_handle(lua_State *L) {

Callers 1

get_rowFunction · 0.85

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected