3 ms·
Backshifting is not quadratic :-) dst = src = ptr; while(*src != '\0') { if(src[0] == '"' && src[1] == '"') { src++; } *dst++ = *src++;
by fanf2 6y ago
Backshifting is not quadratic :-)
dst = src = ptr;
while(*src != '\0') {
if(src[0] == '"' && src[1] == '"') {
src++;
}
*dst++ = *src++;
}
- formerly_proven 6y agoThis bothered me a little, so I went and dug out the only instance were I remember using this technique, and it's quite literally what you wrote. All these high level immutable languages must be getting to me. Thanks :)