libcproject
C static library easier to use than libc (C standard library).
character.h File Reference
#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
#include "string.h"
#include "types.h"
Include dependency graph for character.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void character_append (string_t string, char character)
 Append a character to a string, assuming string points to an array with enough space. More...
 
void character_append_at (string_t string, const char character, const size_t index)
 Append a character to a string at a specific index, assuming string points to an array with enough space. More...
 
char character_to_upper (const char character)
 Converts the character to uppercase. More...
 
char character_to_lower (const char character)
 Converts the character to lowercase. More...
 
bool character_get_is_digit (const char character)
 Check if the character is a digit ('0', '1', '2', '3', '4', '5', '6', '7, '8' or '9'). More...
 
uint8_t character_get_alphabet_position (const char character)
 Get the position in latin alphabet of the letter (case-insensitive) from 1 to 26. Return 0 if the character is not a letter. More...
 

Function Documentation

◆ character_append()

void character_append ( string_t  string,
char  character 
)

Append a character to a string, assuming string points to an array with enough space.

Parameters
string
character
Since
v1.0.0

◆ character_append_at()

void character_append_at ( string_t  string,
const char  character,
const size_t  index 
)

Append a character to a string at a specific index, assuming string points to an array with enough space.

Parameters
string
character
index
Since
v1.0.0

◆ character_to_upper()

char character_to_upper ( const char  character)

Converts the character to uppercase.

Parameters
character
Since
v1.0.0

◆ character_to_lower()

char character_to_lower ( const char  character)

Converts the character to lowercase.

Parameters
character
Since
v1.0.0

◆ character_get_is_digit()

bool character_get_is_digit ( const char  character)

Check if the character is a digit ('0', '1', '2', '3', '4', '5', '6', '7, '8' or '9').

Parameters
character
Returns
bool
Since
v1.0.0

◆ character_get_alphabet_position()

uint8_t character_get_alphabet_position ( const char  character)

Get the position in latin alphabet of the letter (case-insensitive) from 1 to 26. Return 0 if the character is not a letter.

Parameters
character
Returns
uint8_t
Since
v1.0.0