1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2025-05-18 12:02:53 +02:00

feat(cli): add --all option to run test command

This commit is contained in:
Divlo
2021-10-13 21:43:45 +02:00
parent aeff95e691
commit 0a27b9e1a1
47 changed files with 1657 additions and 1773 deletions

View File

@ -9,7 +9,7 @@ void character_append(char* string, char character) {
string[length + 1] = '\0';
}
const char character_to_upper(const char character) {
char character_to_upper(char character) {
char ascii_a = 'a';
char ascii_A = 'A';
char ascii_z = 'z';

View File

@ -1,5 +1,5 @@
#ifndef CHARACTER_H
#define CHARACTER_H
#ifndef __CHARACTER__
#define __CHARACTER__
/**
* @brief Append a character to a string, assuming string points to an array
@ -14,8 +14,8 @@ void character_append(char* string, char character);
* @brief Converts the character to uppercase.
*
* @param character
* @return const char
* @return char
*/
const char character_to_upper(const char character);
char character_to_upper(char character);
#endif

View File

@ -1,6 +1,7 @@
#include "input.h"
#include <stdio.h>
#include <stdlib.h>
#include "character.h"

View File

@ -1,5 +1,5 @@
#ifndef INPUT_H
#define INPUT_H
#ifndef __INPUT__
#define __INPUT__
/**
* @brief Read a line from stdin.

View File

@ -18,7 +18,7 @@ char* string_to_upper(const char* string) {
char* string_reverse(const char* string) {
size_t string_length = strlen(string);
char* result = malloc(sizeof(char) * (string_length + 1));
for (size_t index = string_length - 1; index != -1; index--) {
for (int index = string_length - 1; index != -1; index--) {
character_append(result, string[index]);
}
return result;

View File

@ -1,5 +1,5 @@
#ifndef STRING_H
#define STRING_H
#ifndef __STRING__
#define __STRING__
#include <stdbool.h>