embclib  0.1
Macros | Functions
ctype.h File Reference

Standard ascii character handling function library. More...

#include "complier-cfg.h"
#include "stddef.h"
Include dependency graph for ctype.h:

Go to the source code of this file.

Macros

#define __CTYPE_VERSION   (0x0001u)
 Source file version tag. More...
 

Functions

_STATIC_INLINE_ bool_et IsAlpha (uint8_t ch)
 Check a character is an alphabet or not. Ex. (a-z) and (A-Z) More...
 
_STATIC_INLINE_ bool_et IsDigit (uint8_t ch)
 Check a character is an number character or not. Ex. (0-9) More...
 
_STATIC_INLINE_ bool_et IsAlphaNumeric (uint8_t ch)
 Check a character is an alphabetic and number character or not. Ex. (a-z) (A-Z) (0-9) More...
 
_STATIC_INLINE_ bool_et IsAscii (uint8_t ch)
 Check a character is an ASCII character or not. More...
 
_STATIC_INLINE_ bool_et IsControl (uint8_t ch)
 Check a character is a control character or not. Ex. (
- newline, \t - tab, \r - enter, - backspace) More...
 
_STATIC_INLINE_ bool_et IsGraph (uint8_t ch)
 Check a character is a graphical character or not. Ex. ! " # $ % & ' ( ) * + , - . / (0-9) : ; < = > ? @ (A-Z) [ \ ] ^ _ ` (a-z) { | } ~. More...
 
_STATIC_INLINE_ bool_et IsPunct (uint8_t ch)
 Check a character is a punctuation character or not. Ex. ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~. More...
 
_STATIC_INLINE_ bool_et IsPrintable (uint8_t ch)
 Check a character is a printable character or not. Ex. All graphical character IsGraph include space. More...
 
_STATIC_INLINE_ bool_et IsSpace (uint8_t ch)
 Check a character is a space character or not. Ex. space. More...
 
_STATIC_INLINE_ bool_et IsHexDigit (uint8_t ch)
 Check a character is a hexadecimal character or not. Ex. (0-9) (a-f) (A-F) More...
 
_STATIC_INLINE_ bool_et IsLower (uint8_t ch)
 Check a character is a lower case character or not. Ex. (a-z) More...
 
_STATIC_INLINE_ bool_et IsUpper (uint8_t ch)
 Check a character is a upper case character or not. Ex. (A-Z) More...
 
_STATIC_INLINE_ uint8_t ToLower (uint8_t ch)
 Convert a character to lower case character. Ex. (a-z) (A-Z) to (a-z) More...
 
_STATIC_INLINE_ uint8_t ToUpper (uint8_t ch)
 Convert a character to upper case character. Ex. (a-z) (A-Z) to (A-Z) More...
 

Detailed Description

Standard ascii character handling function library.

Author
Binary Maker (https://github.com/binarymaker)
Date
2019-10-10

Macro Definition Documentation

◆ __CTYPE_VERSION

#define __CTYPE_VERSION   (0x0001u)

Source file version tag.

   version info: [15:8] main [7:0] beta

version: 0.1v

Function Documentation

◆ IsAlpha()

_STATIC_INLINE_ bool_et IsAlpha ( uint8_t  ch)

Check a character is an alphabet or not. Ex. (a-z) and (A-Z)

Parameters
ch[in] Character
Returns
Here is the caller graph for this function:

◆ IsAlphaNumeric()

_STATIC_INLINE_ bool_et IsAlphaNumeric ( uint8_t  ch)

Check a character is an alphabetic and number character or not. Ex. (a-z) (A-Z) (0-9)

Parameters
ch[in] Character
Returns
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsAscii()

_STATIC_INLINE_ bool_et IsAscii ( uint8_t  ch)

Check a character is an ASCII character or not.

Parameters
ch[in] Character
Returns

◆ IsControl()

_STATIC_INLINE_ bool_et IsControl ( uint8_t  ch)

Check a character is a control character or not. Ex. (
- newline, \t - tab, \r - enter, - backspace)

Parameters
ch[in] Character
Returns

◆ IsDigit()

_STATIC_INLINE_ bool_et IsDigit ( uint8_t  ch)

Check a character is an number character or not. Ex. (0-9)

Parameters
ch[in] Character
Returns
Here is the caller graph for this function:

◆ IsGraph()

_STATIC_INLINE_ bool_et IsGraph ( uint8_t  ch)

Check a character is a graphical character or not. Ex. ! " # $ % & ' ( ) * + , - . / (0-9) : ; < = > ? @ (A-Z) [ \ ] ^ _ ` (a-z) { | } ~.

Parameters
ch[in] Character
Returns
Here is the caller graph for this function:

◆ IsHexDigit()

_STATIC_INLINE_ bool_et IsHexDigit ( uint8_t  ch)

Check a character is a hexadecimal character or not. Ex. (0-9) (a-f) (A-F)

Parameters
ch[in] Character
Returns

◆ IsLower()

_STATIC_INLINE_ bool_et IsLower ( uint8_t  ch)

Check a character is a lower case character or not. Ex. (a-z)

Parameters
ch[in] Character
Returns
Here is the caller graph for this function:

◆ IsPrintable()

_STATIC_INLINE_ bool_et IsPrintable ( uint8_t  ch)

Check a character is a printable character or not. Ex. All graphical character IsGraph include space.

Parameters
ch[in] Character
Returns

◆ IsPunct()

_STATIC_INLINE_ bool_et IsPunct ( uint8_t  ch)

Check a character is a punctuation character or not. Ex. ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~.

Parameters
ch[in] Character
Returns
Here is the call graph for this function:

◆ IsSpace()

_STATIC_INLINE_ bool_et IsSpace ( uint8_t  ch)

Check a character is a space character or not. Ex. space.

Parameters
ch[in] Character
Returns

◆ IsUpper()

_STATIC_INLINE_ bool_et IsUpper ( uint8_t  ch)

Check a character is a upper case character or not. Ex. (A-Z)

Parameters
ch[in] Character
Returns
Here is the caller graph for this function:

◆ ToLower()

_STATIC_INLINE_ uint8_t ToLower ( uint8_t  ch)

Convert a character to lower case character. Ex. (a-z) (A-Z) to (a-z)

Parameters
ch[in] Character
Returns
Lower case character
Here is the call graph for this function:

◆ ToUpper()

_STATIC_INLINE_ uint8_t ToUpper ( uint8_t  ch)

Convert a character to upper case character. Ex. (a-z) (A-Z) to (A-Z)

Parameters
ch[in] Character
Returns
Upper case character
Here is the call graph for this function: