C++ Reference: Standard C++ Library reference: C Library: cctype: islower

C++官方参考链接:https://cplusplus.com/reference/cctype/islower/

 (官网里面还有很多超链接,查看链接内容请直接浏览官网网站,没有什么比官网更权威了吧!)

字符分类函数
它们检查作为参数传递的字符是否属于某个类别:

函数
islower
int islower ( int c );

检查字符是否为小写字母
检查c是否为小写字母。
注意什么被认为是字母可能取决于所使用的区域设置;在默认的“C”区域设置中,小写字母是a b c d e f g h i j k l m n o p q r s t u v w x y z。 
其他区域设置可能会考虑选择不同的字符作为小写字符,但绝不考虑对iscntrl、isdigit、ispunct或isspace返回true的字符。
有关不同的ctype函数为标准ASCII字符集的每个字符返回什么的详细图表,请参阅头文件的参考资料。
在C++中,此函数的特定于区域设置的模板版本(islower)存在于头文件中。

参数
c
要检查的字符,类型转换为int或EOF。

返回值
如果c确实是一个小写字母字符,一个不同于0的值(即true)。否则为零(即为false)。

用例
/* islower example */
#include
#include
int main ()
{
  int i=0;
  char str[]="Test String.\n";
  char c;
  while (str[i])
  {
    c=str[i];
    if (islower(c)) c=toupper(c);
    putchar (c);
    i++;
  }
  return 0;

C++ Reference: Standard C++ Library reference: C Library: cctype: islower_第1张图片

你可能感兴趣的:(C++,Reference,c++,c语言)