C's ctype.h prototype

Source: Internet
Author: User

1. Introduction of prototypes

#include <ctype.h>

2. Character Judgment function

Name of function

Judgment set to (true)

Isalnum ()

Letters or numbers

Isalpha ()

Letters

Isblank ()

White space characters (spaces, tabs, line breaks) or any localized characters that are specified as whitespace

Iscntrl ()

Control character

Isgraph ()

All printable characters except for whitespace

Islower ()

lowercase letters

Isprint ()

printable characters

Ispunct ()

Punctuation (except spaces and alphanumeric printable characters)

Isspace ()

Whitespace characters: spaces | wrapping | paper | return | vertical TAB | Horizontal tab | or localized definition character

Isupper ()

Capital

Isxdigit ()

hexadecimal numeric characters

ToLower ()

Returns the lowercase character if it is an uppercase character, otherwise, returns the original argument

ToUpper

If it is lowercase, returns the uppercase character or returns the original argument

eg

#include <stdio.h><ctype.h>int main (void) {    int  CH;    Puts (" Please enter a number ")    ; = GetChar ();     if (IsDigit (CH)) //          putchar (CH);     Else          printf (" not \ n");}

C's ctype.h prototype

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.