summaryrefslogtreecommitdiff
path: root/src/common/extstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/extstr.c')
-rw-r--r--src/common/extstr.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/common/extstr.c b/src/common/extstr.c
index 9986ec1..ed5b971 100644
--- a/src/common/extstr.c
+++ b/src/common/extstr.c
@@ -220,6 +220,33 @@ char *strrpl(char *haystack, const char *needle1, const char *needle2)
/******************************************************************************
* *
+* Paramètres : str = chaîne de caractères à manipuler. [OUT] *
+* *
+* Description : Bascule toute une chaîne de caractères en (min|maj)uscules. *
+* *
+* Retour : Pointeur sur la chaîne fournie. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+char *_strxxx(char *str, int (* fn) (int))
+{
+ size_t max; /* Empleur du parcours */
+ size_t i; /* Boucle de parcours */
+
+ max = strlen(str);
+
+ for (i = 0; i < max; i++)
+ str[i] = fn(str[i]);
+
+ return str;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : str = chaîne de caractères à traiter. *
* delim = séparateur entre les mots. *
* count = nombre de mots trouvés. [OUT] *