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

int my_strcmp(const char *s1, const char *s2)
{
    ssize_t i;

    i = -1;
    while (s1[++i] != '\0' && s1[i] != '\0' && s1[i] == s2[i]);
    return (s1[i] - s2[i]);
}

int my_strncmp(const char *s1, const char *s2, size_t n)
{
    size_t i;

    i = 0;
    while (i < n && s1[i] != '\0' && s1[i] != '\0' && s1[i] == s2[i++]);
    return (s1[i] - s2[i]);
}
