diff options
| author | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:08:27 +0200 |
|---|---|---|
| committer | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:08:27 +0200 |
| commit | c9b6b9a5ca082fe7c1b6f58d7713f785a9eb6a5c (patch) | |
| tree | 3e4f42f93c7ae89a364e4d51fff6e5cec4e55fa9 /rushs/tinyprintf/my_strlowcase | |
add: graphs et rushs
Diffstat (limited to 'rushs/tinyprintf/my_strlowcase')
| -rw-r--r-- | rushs/tinyprintf/my_strlowcase/my_strlowcase.c | 13 | ||||
| -rw-r--r-- | rushs/tinyprintf/my_strlowcase/my_strlowcase.h | 8 |
2 files changed, 21 insertions, 0 deletions
diff --git a/rushs/tinyprintf/my_strlowcase/my_strlowcase.c b/rushs/tinyprintf/my_strlowcase/my_strlowcase.c new file mode 100644 index 0000000..e52ea32 --- /dev/null +++ b/rushs/tinyprintf/my_strlowcase/my_strlowcase.c @@ -0,0 +1,13 @@ +#include "my_strlowcase.h" + +void my_strlowcase(char *s) +{ + size_t i; + for (i = 0; s[i]; i++) + { + if (s[i] >= 'A' && s[i] <= 'Z') + { + s[i] += ('a' - 'A'); + } + } +} diff --git a/rushs/tinyprintf/my_strlowcase/my_strlowcase.h b/rushs/tinyprintf/my_strlowcase/my_strlowcase.h new file mode 100644 index 0000000..d4996b8 --- /dev/null +++ b/rushs/tinyprintf/my_strlowcase/my_strlowcase.h @@ -0,0 +1,8 @@ +#ifndef MY_STRLOWCASE_H +#define MY_STRLOWCASE_H + +#include <stddef.h> + +void my_strlowcase(char *str); + +#endif /* ! MY_STRLOWCASE_H */ |
