isupper, iswupper, _ismbcupper

From RAD Studio
Jump to: navigation, search

Go Up to ctype.h Index

Header File

ctype.h, wctype.h, mbstring.h

Category

Classification Routines

Prototype

int isupper(int c);

int iswupper(wint_t c);

int _ismbcupper(unsigned int c);

Description

Tests for uppercase character.

isupper is a macro that classifies ASCII-coded integer values by table lookup. The macro is affected by the current locale's LC_CTYPE category. For the default C locale, c is an uppercase letter (A to Z).

You can make this macro available as a function by undefining (#undef) it.

Return Value

isupper returns nonzero if c is an uppercase letter.

Example

#include <stdio.h>
#include <ctype.h>
int main(void)
{
  char c = 'C';
  if (isupper(c))
    printf("%c is an uppercase character\n",c);
  else
    printf("%c is not an uppercase character\n",c);
  return 0;
}

Portability

POSIX Win32 ANSI C ANSI C++

isupper

+

+

+

+

_ismbcupper

+

iswupper

+

+

+