/*
** EPITECH PROJECT, 2018
** task01
** File description:
** I do task
*/
#include "lib/my_string.h"

char *my_strcat(char *dest, char const *src)
{
    ssize_t start;
    ssize_t i;

    i = -1;
    start = -1;
    while (dest[++start] != '\0');
    while (src[++i] != '\0')
        dest[start + i] = src[i];
    dest[start + i] = '\0';
    return (dest);
}

char *my_strncat(char *dest, char const *src, size_t n)
{
    ssize_t start;
    ssize_t i;

    i = -1;
    start = -1;
    while (dest[++start] != '\0');
    while (++i < (ssize_t)n && src[i] != '\0')
        dest[start + i] = src[i];
    dest[start + i] = '\0';
    return (dest);
}
