2021-10-13 21:43:45 +02:00
|
|
|
#ifndef __CHARACTER__
|
|
|
|
#define __CHARACTER__
|
2021-09-29 22:34:22 +02:00
|
|
|
|
2023-08-10 11:13:06 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include "string.h"
|
|
|
|
|
2021-09-29 22:34:22 +02:00
|
|
|
/**
|
|
|
|
* @brief Append a character to a string, assuming string points to an array
|
|
|
|
* with enough space.
|
|
|
|
*
|
|
|
|
* @param string
|
|
|
|
* @param character
|
|
|
|
*/
|
|
|
|
void character_append(char* string, char character);
|
|
|
|
|
2023-08-10 11:13:06 +02:00
|
|
|
/**
|
|
|
|
* @brief Append a character to a string at a specific index, assuming string points to an array with enough space.
|
|
|
|
*
|
|
|
|
* @param string
|
|
|
|
* @param character
|
|
|
|
* @param index
|
|
|
|
*/
|
|
|
|
void character_append_at(char* string, const char character, const size_t index);
|
|
|
|
|
2021-09-29 22:34:22 +02:00
|
|
|
/**
|
|
|
|
* @brief Converts the character to uppercase.
|
|
|
|
*
|
|
|
|
* @param character
|
2021-10-13 21:43:45 +02:00
|
|
|
* @return char
|
2021-09-29 22:34:22 +02:00
|
|
|
*/
|
2021-10-13 21:43:45 +02:00
|
|
|
char character_to_upper(char character);
|
2021-09-29 22:34:22 +02:00
|
|
|
|
|
|
|
#endif
|