strcpy()复制一个字符串到另外一个字符串的数组空间。
1 2 3 4 5 6 7 |
extern _ARMABI char *strcpy(char * __restrict /*s1*/, const char * __restrict /*s2*/) __attribute__((__nonnull__(1,2))); /* * copies the string pointed to by s2 (including the terminating nul * character) into the array pointed to by s1. If copying takes place * between objects that overlap, the behaviour is undefined. * Returns: the value of s1. */ |
strcpy()复制一个字符串前面不多于指定长度的字符串的到另外一个字符串的数组空间。
1 2 3 4 5 6 7 8 |
extern _ARMABI char *strncpy(char * __restrict /*s1*/, const char * __restrict /*s2*/, size_t /*n*/) __attribute__((__nonnull__(1,2))); /* * copies not more than n characters (characters that follow a null * character are not copied) from the array pointed to by s2 into the array * pointed to by s1. If copying takes place between objects that overlap, * the behaviour is undefined. * Returns: the value of s1. */ |
这个函数位于string.h
string.h位于“C:\Keil_v5\ARM\ARMCC\include”