libcproject
C static library easier to use than libc (C standard library).
character.h
Go to the documentation of this file.
1 #ifndef __LIBCPROJECT_CHARACTER__
2 #define __LIBCPROJECT_CHARACTER__
3 
4 #include <errno.h>
5 #include <stdbool.h>
6 #include <stdlib.h>
7 
8 #include "string.h"
9 #include "types.h"
10 
19 void character_append(string_t string, char character);
20 
29 void character_append_at(string_t string, const char character, const size_t index);
30 
37 char character_to_upper(const char character);
38 
45 char character_to_lower(const char character);
46 
54 bool character_get_is_digit(const char character);
55 
64 uint8_t character_get_alphabet_position(const char character);
65 
66 #endif
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 cha...
void character_append(string_t string, char character)
Append a character to a string, assuming string points to an array with enough space.
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 sp...
char character_to_lower(const char character)
Converts the character to lowercase.
char character_to_upper(const char character)
Converts the character to uppercase.
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').
char * string_t
Definition: types.h:8