Though my statement will be controversial, there is only one correct answer to this. Juicyfroot. The reason for this is in the following example of Microsoft C#. That's what Microsoft uses in...
Type: Posts; User: thickster
Though my statement will be controversial, there is only one correct answer to this. Juicyfroot. The reason for this is in the following example of Microsoft C#. That's what Microsoft uses in...
create an array of the same size to hold the new string (since we know its length
will be <= the original (use strlen). Or you could just copy the characters in
order back into the original...
And just to sum things up ....
After learning that my own Cortex-M4 processor actually DOES allow unaligned 32-bit accesses, I wrote a MUCH simpler procedure to do an alternative memcpy function...
To ensure this works for all cases of small copy lengths, insert the following code after the variable declarations:
// This is necessary to avoid errors due to the careless...
It would be best to include some test for small copy sizes into this code. That way, it would work for all cases, so I was too quick to publish this code. The code assumes that the length will...
(Sorry if I didn't do this reply correctly. I'm a first-timer.)
Sorry, I'm a lowly firmware engineer who uses only embedded microcontrollers. I'm offering this code quite humbly for other embedded programmers who might need a few extra usecs of speed in their...
/******************************************************************************
*
* Function Name: manualCopy
*
* Description: Manually copies data from memory to memory. This is used by
...