dataString is a volatile because it is being changed in an interrupt.
pCache is made using the SdFat library by Bill Greiman.
Right now I am using the following call to copy them
strlcpy((char*)pCache,(char*)dataString,512);
This probably isn't the best way to do it... and I'm trying to make sure this goes very fast.
Any thoughts?
The string handling routines from the string.h file ARE about the best way to deal with strings. They are extremely well tested, and highly optimized.
I'm concerned that the pCache pointer may not be pointing to enough space to copy the whole dataString array to, but, if you are sure that it is, go ahead.
As far as the actual copying of data, no. But, your function has some limitations. For one thing, it does not assure that from and to are different. For another, it does no checking on the size of the arrays.