串和字符串函数
来源:互联网 发布:淘宝上怎么没有卖刀的 编辑:程序博客网 时间:2024/05/17 07:56
<!--@page { margin: 2cm }P { margin-bottom: 0.21cm }-->
串和字符串
1.isalnum
#include<ctype.h>
intisalnum(int ch);
函数是判断字符是否是字母或数字。若是,返回非0值。否则返回0;
2。isalpha
#include<ctype.h>
intisalpha(int ch);
函数是判断字符是否是字母。若是,则返回非0;否则返回0;
3。isblank
#include<ctype.h>
intisblack(int ch)
4.isdigit
#include<ctype.h>
intisdigit(int ch);
当ch为数字时(0--9),函数返回非0值
5.islower
#include<ctype.h>
intislower(int ch);
如果ch为小写字母,函数返回非0值。
6.ispunct
#include<ctype.h>
intispunct(int ch)
如果ch是标点符号,函数返回非0值。
7.isspace
#include<ctype.h>
intisspace(int ch);
当ch为空白字符,包括空格/水平制表符/垂直制表符/换页/回车/新行符时,函数返回于非0。
8.isupper
#include<ctype.h>
intisupper(int ch);
如果ch是大写字母,函数返回非0值
9.memchr
#include<string.h>
void*memchr(const void *buf,int ch,size_t count);
在buf前count返回首次出现ch的地址;若未找到,返回空指针。
10.memcpy
#include<string.h>
intmemcmp(const void *buf1,const void *buf2,size_t count);
函数比较buf1和buf2指向的数组的前count个字节。结果为buf1-buf2
11memcpy
#include<string.h>
void*memcpy(void *to ,const void *from,size_t count);
函数将从from指向的数组向to指向的数组复制count个字符。
12.memmove
#include<string.h>
void*memmove(void *to,const void *from,size_t count);
功能和memcpy。只是当to和from同地址时仍执行。
13.memset
#include<string.h>
void*memset(void *buf,int ch,size_t count);
14.strcat
追加
15.strchr
#include<string.h>
char*strchr(const char *str,int ch);
返回str中第一次出现ch的地址。若没有,返回空指针
16.strcmp
#include<string.h>
intstrcmp(const char *str1,const char str2);
函数返回str1-str2
17.strcpy
#include<string.h>
char*(char *str1,const char *str2);
18.strlen
#include<string.h>
size_tstrlen(const char *str);
19.strncat
#include<string.h>
char*strncat(char *str1,const char *str2,size_t count);
将str2前count字节追加到str1
20.strncmp
#include<string.h>
intstrncmp(const char *str1,const char *str2,size_t count)
比较前count字节。str1-str2
21.strncpy
#include<string.h>
char*strncpy(char *str1,const char *str2,size_t count);
复制前count字节
22.tolower
#include,ctype.h>
inttolower(int ch);
返回小写。Ch值不变
23.toupper
#include<ctype.h>
inttoupper(int ch);
返回大写。
- 串和字符串函数
- 字符串和字符串函数
- 字符串和字符串函数
- 字符串和字符串函数复习
- C -- 字符串和字符串函数
- 字符串和字符函数
- 函数和字符串排序
- 字符串函数和方法
- 11.2 字符串和字符串函数:fgets()函数
- 第11章,字符串和字符串函数
- 笔记(5)字符串和字符串函数
- UINCODE字符串和安全字符串函数
- 标准字符串和宽字符串处理函数
- c语言中字符串和字符串函数
- 第十一章 字符串和字符串函数
- c字符串和字符串函数学习总结
- 字符串和内存操作函数
- 字符串函数和存储过程
- SQL连接分类及使用说明
- 回归
- 搭建Eclipse+MyEclipse开发环境
- 谁用过Java编写OA系统
- 按钮的不同动作显示不同的图标
- 串和字符串函数
- 几个小故事[转]
- char*怎么转换成LPCTSTR
- "无法找到“XXX.exe”的调试信息,或者调试信息不匹配。未使用调试信息生成二进制文件"的解决方法
- >/dev/null 2>&1
- 分布式数据库应用开发正解
- Linux常用的二进制文件分析方法
- Qt中时钟时间功能QTime详解
- 周末北大学拳散记--搜狐畅游招聘