加入收藏
举报
当前仅显示指定条件回帖 [ 展开查看全部 ]
02-14 20:02
#
文件名称:
ctype-h.md
所在目录:
Openharmony v1.0 / docs / api / api-SmartVision-Devices
文件大小:
22.00 KB
下载地址:
fenwii/OpenHarmony
   
免责声明:本网站仅提供指向 GitHub 上的文件的链接,所有文件的版权归原作者所有,本网站不对文件内容的合法性、准确性或安全性承担任何责任。
文本预览:
# ctype.h
## **Overview**
**Related Modules:**
[UTILS](UTILS.md)
**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.


点赞 回复
回帖
支持markdown部分语法 ?