![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
函数专题
huguangshanse00
这个作者很懒,什么都没留下…
展开
-
strspn函数 strcspn函数
strspn函数,strcspn函数原创 2015-10-25 11:57:40 · 2933 阅读 · 0 评论 -
strstr函数与KMP算法比较
代码://KMP算法#include #include #include#include #include //Copyright 1990 Software Development Systems, Inc.char *strstr_1(const char *s1,const char *s2){ int len2; if(!(len2=strlen(s2)))原创 2015-10-25 16:20:37 · 4717 阅读 · 3 评论 -
strstr函数
strstr函数原创 2015-10-25 14:53:57 · 4120 阅读 · 0 评论 -
getrlimit setrlimit
getrlimit, setrlimit函数原创 2015-11-22 11:15:01 · 1278 阅读 · 0 评论 -
getopt 函数 getopt_long函数
getopt原创 2015-11-22 18:03:30 · 858 阅读 · 0 评论 -
printf %m
看到过printf("%m\n"); 这样类似语句,这个到底是什么格式输出呢?查看资料,还是man大法好。m (Glibc extension.) Print output of strerror(errno). No argument is required.原来等价于printf("%s",strerror(errno));简单示例:#include#i原创 2015-11-01 10:39:42 · 9029 阅读 · 0 评论 -
函数: dup dup2
linux中有各种函数,看函数主要去了解它实现的功能是什么。dup 就是复制文件描述符,选取的是当前最小的文件描述符; 那么dup2是什么呢?dup2(oldf,newf) 也是复制文件描述符,只不过可以指定newf,且如果newf如果是已经打开的,会先关闭,然后再重新打开指向文件。 有没有比较详细的好文章?请看这个:http://zyan.cc/book/linux_c/html/c转载 2016-05-17 07:21:33 · 361 阅读 · 0 评论 -
linux之select函数, poll, epoll
参考:1. linux select函数详解转载 2017-03-16 07:17:40 · 587 阅读 · 0 评论 -
函数 strtok_r
经常在编程时,会对字符串按指定的分隔符进行分隔然后取值,那么就用到了函数strtok_r。下面看下示例:#include <stdio.h>#include <string.h>int main(){ int in=0; char buffer[1024]="Fred male 25,John male 62,Anna...原创 2016-05-18 08:32:15 · 508 阅读 · 0 评论