2 ms·dest[0] = '\0'; strncat(dest, src, size);by _kst_ 11y agodest[0] = '\0'; strncat(dest, src, size);jjnoakes 11y agoSure. Or: strncpy(dest, src, size); dest[size - 1] = '\0';nitrogen 11y agoThe fact that strncpy zeros the buffer may make it slower.jjnoakes 11y agoSure, by a couple of cycles. Unless your size is huge. In which case, perhaps you should try to avoid copying strings in the first place.