From f08b2ca3617dbfa2a2aa0f2bc28d345f83b6e8a2 Mon Sep 17 00:00:00 2001 From: Supermjork Date: Tue, 22 Aug 2023 12:20:43 +0300 Subject: [PATCH] if idea no work, you copy errytang))) xd --- main.h | 1 + puts.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 puts.c diff --git a/main.h b/main.h index ddf9ce2..93c6ff7 100644 --- a/main.h +++ b/main.h @@ -5,5 +5,6 @@ int _contains(const char *str, char c); int _strlen(const char *str); char *_strcpy(char *dest, char *src); char *append(char *str, char c); +void _puts(char *str); #endif diff --git a/puts.c b/puts.c new file mode 100644 index 0000000..5e324fb --- /dev/null +++ b/puts.c @@ -0,0 +1,15 @@ +#include "main.h" +#include + +/** + * _puts - splurges whatever is in buffer + * + * @str: pointers to "buffer" or string head + * + * Return: Naught + */ + +void _puts(char *str) +{ + write(1, str, _strlen(str)); +}