Swedish letters fuck up parsing into SQL querry

Adam D. Ruppe destructionator at gmail.com
Mon Mar 23 15:07:31 UTC 2020


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?


More information about the Digitalmars-d-learn mailing list