MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / expertDequote

Function expertDequote

modules/dasSQLITE/sqlite/shell.c:10580–10601  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10578};
10579
10580static char *expertDequote(const char *zIn){
10581 int n = STRLEN(zIn);
10582 char *zRet = sqlite3_malloc(n);
10583
10584 assert( zIn[0]=='\'' );
10585 assert( zIn[n-1]=='\'' );
10586
10587 if( zRet ){
10588 int iOut = 0;
10589 int iIn = 0;
10590 for(iIn=1; iIn<(n-1); iIn++){
10591 if( zIn[iIn]=='\'' ){
10592 assert( zIn[iIn+1]=='\'' );
10593 iIn++;
10594 }
10595 zRet[iOut++] = zIn[iIn];
10596 }
10597 zRet[iOut] = '\0';
10598 }
10599
10600 return zRet;
10601}
10602
10603/*
10604** This function is the implementation of both the xConnect and xCreate

Callers 1

expertConnectFunction · 0.85

Calls 1

assertFunction · 0.85

Tested by

no test coverage detected