From: Michael D. Lowis Date: Wed, 20 Aug 2014 20:43:46 +0000 (-0400) Subject: Implemented string compare X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=5c6042991558fd86444152412580a9ff0cd3537e;p=projs%2Flibcds.git Implemented string compare --- diff --git a/source/string/str.c b/source/string/str.c index 0f4bdc8..1c82cbb 100644 --- a/source/string/str.c +++ b/source/string/str.c @@ -89,8 +89,6 @@ str_t* str_insert(str_t* p_str1, size_t index, str_t* p_str2) return p_newstr; } -#include - str_t* str_erase(str_t* p_str, size_t start, size_t end) { str_t* p_newstr = NULL; @@ -122,9 +120,7 @@ str_t* str_substr(str_t* p_str, size_t start, size_t end) int str_compare(str_t* p_str1, str_t* p_str2) { - (void)p_str1; - (void)p_str2; - return 0; + return strcmp(p_str1->data, p_str2->data); } size_t str_find(str_t* p_str1, str_t* p_str2)