22 lines
420 B
C
22 lines
420 B
C
#include "EMstrcpy.h"
|
|
|
|
/** \brief A simple implementation of strcpy
|
|
*
|
|
* \param char *dest -> destination buffer
|
|
* \param char *source -> source buffer
|
|
* \return char *p -> pointing to the destination buffer
|
|
*
|
|
* A bit lighter than the standard strcpy
|
|
*/
|
|
|
|
char *EMstrcpy(char *dest, const char *source)
|
|
{
|
|
const char *p_src = source;
|
|
for(;*p_src;)
|
|
{
|
|
*dest++ = *p_src++;
|
|
}
|
|
|
|
return dest;
|
|
}
|