2020年3月4日

memmove and memcpy demo

摘要: memmove内存有重叠,保证源字符串被覆盖之前,拷贝到目的川 memcpy不保证 最好用memmove #include <stdio.h> #include <stdlib.h> #include <string.h> #include <pthread.h> int main() { char 阅读全文

posted @ 2020-03-04 00:37 luckygxf 阅读(177) 评论(0) 推荐(0) 编辑

c atoi demo

摘要: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <pthread.h> int main() { char *ns = "124142"; char *ns1 = "324241324"; printf("%d\ 阅读全文

posted @ 2020-03-04 00:29 luckygxf 阅读(162) 评论(0) 推荐(0) 编辑

c strsep函数demo

摘要: 在string.h中,分割字符串 #include <stdio.h> #include <stdlib.h> #include <string.h> int main() { char date[50] = "2019-10-1"; char delim[2] = "-"; char *s = s 阅读全文

posted @ 2020-03-04 00:23 luckygxf 阅读(677) 评论(0) 推荐(0) 编辑

导航