1 Star 0 Fork 4.9K

平凡 / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ctype-h.md 22.00 KB
一键复制 编辑 原始数据 按行查看 历史
wenjun 提交于 2020-09-08 10:08 . add OpenHarmony 1.0 baseline

ctype.h

Overview

Related Modules:

UTILS

Description:

Provides functions used for parameter identification.

You can use the functions in this file to perform the mathematical operations required during development, for example, check whether the passed parameter is an alphabetic character, a blank character, not a number (NaN), a control character, or a decimal digit.

Since:

1.0

Version:

1.0

Summary

Macros

Macro Name and Value

Description

_tolower(a)   ((a)|0x20)

Converts an uppercase letter to its lowercase equivalent.

_toupper(a)   ((a)&0x5f)

Converts a lowercase letter to its uppercase equivalent.

isascii(a)   (0 ? isascii(a) : (unsigned)(a) < 128)

Checks whether a parameter is an ASCII character.

Functions

Function Name

Description

isalnum (int c)

int 

Checks whether a parameter is an alphabetic character or a decimal digit.

isalpha (int c)

int 

Checks whether a parameter is an alphabetic character.

isblank (int c)

int 

Checks whether a parameter is a blank character (space or tap).

iscntrl (int c)

int 

Checks whether a parameter is a control character. A control character is invisible and does not occupy a printing position on a display.

isdigit (int c)

int 

Checks whether a parameter is a decimal digit (0-9).

isgraph (int c)

int 

Checks whether a parameter is any printable character except the space character.

islower (int c)

int 

Checks whether a parameter is a lowercase letter.

isprint (int c)

int 

Checks whether a parameter is a printable character (including space).

ispunct (int c)

int 

Checks whether a parameter is a punctuation or special character.

isspace (int c)

int 

Checks whether a parameter is a space character.

isupper (int c)

int 

Checks whether a parameter is an uppercase letter.

isxdigit (int c)

int 

Checks whether a parameter is a hexadecimal digit.

tolower (int c)

int 

Converts an uppercase letter specified by c to its lowercase equivalent.

toupper (int c)

int 

Converts a lowercase letter specified by c to its uppercase equivalent.

isalnum_l (int c, locale_t locale)

int 

Checks whether a parameter is an alphabetic character or digit for the specified locale.

isalpha_l (int c, locale_t locale)

int 

Checks whether a parameter is an alphabetic character for the specified locale.

isblank_l (int c, locale_t locale)

int 

Checks whether a parameter is a blank character (including spaces and tabs) for the specified locale.

iscntrl_l (int c, locale_t locale)

int 

Checks whether a parameter is a control character for the specified locale.

isdigit_l (int c, locale_t locale)

int 

Checks whether a parameter is a decimal digit for the specified locale.

isgraph_l (int c, locale_t locale)

int 

Checks whether a parameter is any printable character except the space character for the specified locale.

islower_l (int c, locale_t locale)

int 

Checks whether a parameter is a character of lowercase letters for the specified locale.

isprint_l (int c, locale_t locale)

int 

Checks whether a parameter is a printable character (including space) for the specified locale. A printable character is visible and occupies a printing position on a display.

ispunct_l (int c, locale_t locale)

int 

Checks whether a parameter is a punctuation or special character for the specified locale.

isspace_l (int c, locale_t locale)

int 

Checks whether a parameter is a blank character for the specified locale.

isupper_l (int c, locale_t locale)

int 

Checks whether a parameter is a character of uppercase letters for the specified locale.

isxdigit_l (int c, locale_t locale)

int 

Checks whether a parameter is a hexadecimal digit for the specified locale.

tolower_l (int c, locale_t locale)

int 

Converts an upper letter specified by c to its lowercase equivalent for the specified locale.

toupper_l (int c, locale_t locale)

int 

Converts a lowercase letter specified by c to its uppercase equivalent for the specified locale.

toascii (int c)

int 

Converts a parameter of the integer type to an ASCII code.

1
https://gitee.com/pingfan_vs_hs/docs.git
git@gitee.com:pingfan_vs_hs/docs.git
pingfan_vs_hs
docs
docs
master

搜索帮助