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

style: fix editorconfig lint

This commit is contained in:
Divlo
2021-09-29 00:10:40 +02:00
parent a6bd36b754
commit 08fd145584
2 changed files with 5 additions and 6 deletions

View File

@ -31,14 +31,13 @@ bool string_is_palindrome(const char* string) {
return is_palindrome;
}
char* string_replace(const char* string, char search_value,
char replace_value) {
char* string_replace(const char* string, char search, char replace) {
size_t string_length = strlen(string);
char* result = malloc(sizeof(char) * (string_length + 1));
for (size_t index = 0; index < string_length; index++) {
bool is_search_value = search_value == string[index];
bool is_search_value = search == string[index];
if (is_search_value) {
character_append(result, replace_value);
character_append(result, replace);
} else {
character_append(result, string[index]);
}