MFC中常用函数学习.pdfVIP

  • 7
  • 0
  • 约2.11万字
  • 约 27页
  • 2021-11-12 发布于广东
  • 举报
1.IsEmpty() 函数判断一对象是否初始化,返回布尔值 . 表达式 IsEmpty(expression) 实例: % Dim i response.write IsEmpty(i) % 返回结果 : true 2. GetAt 函数原型: TCHAR GetAt( int nIndex ) const; 函数返回值:字符中第 nIndex 个字符(从 0 开始) . Header: atlcoll.h 注意: nIndex 的最大值可由 GetUpperBound() 得到。 若 nIndex 小于 0 或大于最大值,将返回错误。 3. isdigit isdigit 原型: extern int isdigit(char c); 用法: #include ctype.h 功能:判断字符 c 是否为数字 说明: 当 c 为数字 0-9 时,返回非零值, 否则返回零。 附加说明 此为宏定义,非真正函数。 相关函数: isalnum,isalpha,isxdigit,iscntrl,isgraph,isprint,i spunct,isspace 4. isalnum 原型: extern int isalnum(int c); 用法: #include ctype.h 功能:判断字符变量 c 是否为字母或数字 说明:当 c 为数字 0-9 或字母 a-z 及 A-Z 时,返回非 零值,否则返回零。 5. isalpha 函数: isalpha 原型: int isalpha (int ch ) 用法:头文件加入 #include cctype( 旧版本的编译 器使用 ctype.h ) 功能:判断字符 ch 是否为英文字母,当 ch 为英文字 母 a-z 或 A-Z 时,在标准 c 中相当于使用 “isupper(ch)||islower(ch) ”做测试,返回非零值,否 则返回零。 PS:{ isupper 原型: extern int isupper(int c); 头文件: cctype( 旧版本的编译器使用 ctype.h) 功能:判断字符 c 是否为大写英文字母 说明:当参数 c 为大写英文字母 (A-Z) 时,返回非零值, 否则返回零。 附加说明: 此为宏定义,非真正函数。 islower islower (测试字符是否为小写字母) 相关函数 isalpha ,isupper 表头文件 #includecctype( 旧版本的编译器使用 ctype.h) 定义函数 int islower(int c) 函数说明 检查参数 c 是否为小写英文字母。 返回值 若参数 c 为小写英文字母,则返回 TRUE,否则返回 NULL(0) 。

文档评论(0)

1亿VIP精品文档

相关文档