Deprecito

This commit is contained in:
2023-08-21 13:47:47 +03:00
parent bc32277deb
commit f316833e4c
3 changed files with 18 additions and 2 deletions

View File

@@ -35,3 +35,19 @@ int _contains(const char *str, char c)
else
return (0);
}
/**
* append - shoved character at the end
*
* @str: main string
* @c: character getting shoved
*
* Return: da string but appended
*/
void append(char *str, char c)
{
int len = _strlen(str);
*(str + len) = c;
*(str + len + 1) = '\0';
}