summaryrefslogtreecommitdiff
path: root/src/common/extstr.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-05-07 21:57:28 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-05-07 21:57:28 (GMT)
commit69f08c8dddca6b31b4b3c334246dbbbdcf501701 (patch)
tree8ac2619f80f070c54d6ee30878a2d4185a224ae1 /src/common/extstr.c
parentdd2b41538e20de5472cd8c888c530327a1351866 (diff)
Created a small function to compare pointers to strings.
Diffstat (limited to 'src/common/extstr.c')
-rw-r--r--src/common/extstr.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/common/extstr.c b/src/common/extstr.c
index 4cb42a3..b2a02a7 100644
--- a/src/common/extstr.c
+++ b/src/common/extstr.c
@@ -157,6 +157,30 @@ int strrcmp(const char *str1, const char *str2)
/******************************************************************************
* *
+* Paramètres : str1 = preière chaîne de caractères à analyser. *
+* str2 = seconde chaîne de caractères à analyser. *
+* *
+* Description : Compare deux pointeurs vers des chaînes de caractères. *
+* *
+* Retour : -1, 0, ou 1 selon la comparaison. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+int strptrcmp(const char * const *str1, const char * const *str2)
+{
+ int result; /* Bilan à renvoyer */
+
+ result = strcmp(*str1, *str2);
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : haystack = botte de foin à fouiller. *
* needle1 = aiguille à trouver et remplacer. *
* needle2 = aiguille de remplacement. *