/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* mem_compare.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: maiboyer +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/06 11:16:02 by maiboyer #+# #+# */ /* Updated: 2023/12/09 15:00:58 by maiboyer ### ########.fr */ /* */ /* ************************************************************************** */ #include "me/mem/mem.h" bool mem_compare(const void *lhs, const void *rhs, t_usize count) { t_usize i; t_u8 *lhs_; t_u8 *rhs_; i = 0; lhs_ = (t_u8 *)lhs; rhs_ = (t_u8 *)rhs; while (i < count) { if (lhs_[i] - rhs_[i]) return (false); i++; } return (true); }