3 ms·
> There are certainly not 3 strlen calls underneath a strcpy() plus a strcat() call. No, but strcpy does need to check each char for NUL byte as it copies the
by vardump 8y ago
> There are certainly not 3 strlen calls underneath a strcpy() plus a strcat() call.
No, but strcpy does need to check each char for NUL byte as it copies the string. And strcat will need to redo same check on the original strcpy'ied string plus the new one.
So "abc" length is effectively checked twice and "1234" once.
So there's some truth to the matter, even though they're not "true" strlen calls.