diff options
| author | Anser <rostgans@tutamail.com> | 2026-07-23 01:49:45 +0200 |
|---|---|---|
| committer | Anser <rostgans@tutamail.com> | 2026-07-31 11:12:41 +0200 |
| commit | 856376d623535d2fd6734592f7018efeaf9bab7a (patch) | |
| tree | c25b510ab5e975d71a3a9f67928ef01dc63d278f /src/modules/utils/utils.h | |
| parent | 4d4d1ff11c26ac277d8015f4a4e55dbc6da3b25c (diff) | |
created utils module
Diffstat (limited to 'src/modules/utils/utils.h')
| -rw-r--r-- | src/modules/utils/utils.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/modules/utils/utils.h b/src/modules/utils/utils.h new file mode 100644 index 0000000..1dfbb51 --- /dev/null +++ b/src/modules/utils/utils.h @@ -0,0 +1,14 @@ +#ifndef UTILS_H +#define UTILS_H + +/* function: char *string_format(char* string) + * input: pointer to a null-terminated string (must not be NULL) + * return: pointer to a newly allocated string containing all space-separated words, + * joined by single spaces; leading/trailing/multiple spaces are ignored. + * on-error: returns NULL if memory allocation fails + * misc: the returned pointer must be freed by the caller using free() + * limits: processes at most 10 words, each up to 49 characters (last '\0') + */ +char *string_format(char* string); + +#endif |
