On Monday, 23 March 2020 at 15:07:31 UTC, Adam D. Ruppe wrote:
On Monday, 23 March 2020 at 14:26:46 UTC, Anders S wrote:
do you mean I should loop through each pos till strlen(cellTab[CellIndex].name) to find "\0"?

strlen is ok, that gives the answer itself. Just slice to that.

cellTab[CellIndex].name[0 .. strlen(cellTab[CellIndex].name.ptr)]

could do it. or

size_t end = 0;
foreach(idx, ch; cellTab[CellIndex].name)
   if(ch == 0) {
        end = idx;
        break;
   }

auto name = cellTab[CellIndex].name[0 .. end];


anything like that

How do you suggest I do the querry build then?

how are you running it? using a lib or just generating a .sql file?

Hi,
I'm creating a connection to the db and conn.exec(sql)
I think I'll try the foreach to find out if it works .... ( tomorrow )


Reply via email to