C语言
文章平均质量分 79
For Nine
这个作者很懒,什么都没留下…
展开
-
C++ printf族函数
1、所有的printf族函数 有两大类: #include<stdio.h> int printf(const char* format, ...); int fprintf(FILE* stream, const char* format, ...); int dprintf(int fd, const char* format, ...); int sprintf(char* str, const char* format, ...); int snprintf(char* str, siz原创 2022-05-15 18:23:36 · 793 阅读 · 1 评论 -
Linux 中与字符串相关的函数strpbrk、strcasecmp、strspn(不间断更新)
本篇博客旨在整理出所有Linux网络编程中常用的字符串相关的函数,这些函数普遍用在处理网络通信中的字符串数据。话不多说,直接进入正题。 1、strpbrk函数 #include<string.h> char* strpbrk(char* s1, char* s2); strpbrk()从第一个字符指针指向的位置 向后检查每个字符,直到遇到\0(不检查\0),如果检查到的某个字符在s2指向的字符串中,那么返回他的地址,并停止检查。 如果s1 、s2没有相同字符,返回NULL。 注:传入strpb原创 2022-05-15 15:29:23 · 711 阅读 · 0 评论