• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

memcpy vs strncpy? hrm

DWW

Platinum Member
These two seem very similar
Any idea which is faster? I'm thinking memcpy might be?

 
There is a more appropriate software forum for this question, but anyway...

memcpy() will generally be faster as strncpy() handles the padding of the destination string with null characters if necessary. The performance different will be negligible, but strncpy() is used to copy strings, and memcpy() is used to copy bytes from one location to another without regard to its representation.
 
There is a more appropriate software forum for this question, but anyway...

This forum is OFF-TOPIC though 😉
Anything goes and generally it has more action here heh.
 
Back
Top