...
lib_str.h/lib_str.c
Prototype
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
CPU_CHAR *Str_Copy ( CPU_CHAR *pstr_dest,
const CPU_CHAR *pstr_src);
|
Arguments
pstr_dest
Pointer to the string memory buffer to copy string characters into.
...
String copy terminates if either string pointer points to or overlaps the NULL
address.
Example Usage
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
CPU_CHAR AppBuf[20]; CPU_CHAR *pstr; pstr = Str_Copy(&AppBuf[0], "Hello World!"); if (pstr == (CPU_CHAR *)0) { printf("STRING COPY FAILED!"); } |