d1b09563b38ddb2d9a7efa01210cb53309f1fa85
3 //FIXME: Comment the code !!!
5 void swap(char* v1
, char* v2
) {
13 int stringLength(const char* str
) {
16 for(length
= 0; str
[length
] != '\0'; ++length
);
20 // FIXME: this function have issues with non english characters
21 void reverseString(char* str
) {
22 int length
= stringLength(str
);
24 for (int i
= length
- 1; i
>= length
/2; --i
) {
25 swap(&str
[i
], &str
[(length
- 1) - i
]);
30 char msg
[] = "Bonjour et a bientot";
31 int length
= stringLength(msg
);
33 printf("La chaine de caracteres est \"%s\" et a pour longueur %d caractere(s)\n", msg
, length
);
35 printf("La chaine inversee de caracteres est \"%s\"\n", msg
);