From 08fd145584a1bd10173a08b0125f705a293c0ffa Mon Sep 17 00:00:00 2001 From: Divlo Date: Wed, 29 Sep 2021 00:10:40 +0200 Subject: [PATCH] style: fix editorconfig lint --- challenges/is-palindrome/solutions/c/function/string.c | 7 +++---- challenges/is-palindrome/solutions/c/function/string.h | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/challenges/is-palindrome/solutions/c/function/string.c b/challenges/is-palindrome/solutions/c/function/string.c index e35a928..8c9f88c 100644 --- a/challenges/is-palindrome/solutions/c/function/string.c +++ b/challenges/is-palindrome/solutions/c/function/string.c @@ -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]); } diff --git a/challenges/is-palindrome/solutions/c/function/string.h b/challenges/is-palindrome/solutions/c/function/string.h index ec6bb8f..791047c 100644 --- a/challenges/is-palindrome/solutions/c/function/string.h +++ b/challenges/is-palindrome/solutions/c/function/string.h @@ -30,7 +30,7 @@ char* string_reverse(const char* string); bool string_is_palindrome(const char* string); /** - * @brief Replace all the occurrences of search_value into replace_value in + * @brief Replace all the occurrences of search value into replace value in * the string. * * @param string @@ -38,6 +38,6 @@ bool string_is_palindrome(const char* string); * @param replace_value A character containing the text to replace for match. * @return char* */ -char* string_replace(const char* string, char search_value, char replace_value); +char* string_replace(const char* string, char search, char replace); #endif