目录

islower

描述 (Description)

它检查字符是否为小写字母,其他语言环境可能将不同的字符选择视为小写字符,但从不为iscntrl,isdigit,ispunct或isspace返回true的字符。

声明 (Declaration)

以下是std :: islower的声明。

C++98

int islower ( int c );

C++11

int islower ( int c );

参数 (Parameters)

c - 要检查的字符,转换为int或EOF。

返回值 (Return Value)

它返回一个不等于零的值。

异常 (Exceptions)

No-throw guarantee - 此函数永远不会抛出异常。

例子 (Example)

在下面的示例中为std :: islower。

#include <stdio.h>
#include <ctype.h>
int main () {
   int i=0;
   char str[]="IOWIKI india pvt ltd.\n";
   char c;
   while (str[i]) {
      c=str[i];
      if (islower(c)) c=toupper(c);
      putchar (c);
      i++;
   }
   return 0;
}

样本输出应该是这样的 -

TUTORIALS POINT INDIA PVT LTD.
↑回到顶部↑
WIKI教程 @2018