labuladong算法小抄:https://labuladong.gitbook.io/algo/
https://github.com/jobbole/awesome-programming-books
| 种类 | 函数 | 说明 | 链接 |
|---|---|---|---|
| 排序 | |||
| qsort | 对基本数据类型或结构体类型的数组进行排序 | http://www.cplusplus.com/reference/cstdlib/qsort/?kw=qsort | |
| 查找函数 | |||
| bsearch | 二分查找,查找前需进行排序 | ||
| 字符串 | |||
| strtok | 分割字符串:将输入字符串按照某个分隔符进行拆分,常用于IP、文件路径等字符串的处理。 | https://cplusplus.com/reference/cstring/strtok/?kw=strtok | |
| strcmp | 字符串比较(按字典序) | ||
| strcpy | 拷贝字符串,末尾会自动补‘\0‘ | ||
| strncpy | 拷贝指定长度的字符串,末尾会自动补‘\0‘ | ||
| strstr | 从str的左侧开始查找子字符串首次出现的位置 | ||
| strchr | 从str的左侧开始查找字符首次出现的位置 | ||
| strrchr | 从str的右侧开始查找字符首次出现的位置 | ||
| strcat | 拼接字符串 | ||
| 格式化函数 | |||
| sscanf | 从字符串格式化读取数据 | https://www.cplusplus.com/reference/cstdio/sscanf/?kw=sscanf | |
| sprintf | 数据格式化输出到字符串,末尾会自动补‘\0‘ | https://www.cplusplus.com/reference/cstdio/sprintf/?kw=sprintf | |
| snprintf | 数据格式化输出到指定大小的字符串,末尾会自动补‘\0‘ | ||
| 字符串和整型转换 | |||
| strtol | 字符串转换成long型。避免使用atoi。 | ||
| strtoll | 字符串转换成long long型。 | ||
| Uthash开源库 | |||
| hash | hash操作 | ||
| list | 链表操作可实现为:队列、栈 | ||
| array | 动态数组 | ||
| string | 动态字符串 | ||
| stack | 栈 | ||
| ringbuffer | 循环缓冲区 |
原文:https://www.cnblogs.com/lvzh/p/15172265.html