Started from buttom go to the sky

This commit is contained in:
Raphaël 2024-04-28 19:59:01 +02:00
parent 96215449bd
commit f811e55dea
4781 changed files with 10121 additions and 1743 deletions

20
stdme/src/char/isalnum.c Normal file
View file

@ -0,0 +1,20 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* isalnum.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/04 16:19:40 by maiboyer #+# #+# */
/* Updated: 2023/11/09 19:38:51 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#include "me/char/isalnum.h"
#include "me/char/isalpha.h"
#include "me/char/isdigit.h"
bool me_isalnum(char chr)
{
return (me_isalpha(chr) || me_isdigit(chr));
}

18
stdme/src/char/isalpha.c Normal file
View file

@ -0,0 +1,18 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* isalpha.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/04 16:19:40 by maiboyer #+# #+# */
/* Updated: 2023/11/08 04:01:25 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#include "me/char/isalpha.h"
bool me_isalpha(char chr)
{
return (('z' >= chr && chr >= 'a') || ('Z' >= chr && chr >= 'A'));
}

18
stdme/src/char/isascii.c Normal file
View file

@ -0,0 +1,18 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* isascii.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/09 17:51:01 by maiboyer #+# #+# */
/* Updated: 2024/04/28 19:41:21 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#include "me/char/isascii.h"
bool me_isascii(char chr)
{
return (0 <= chr && chr);
}

18
stdme/src/char/isdigit.c Normal file
View file

@ -0,0 +1,18 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* isdigit.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/04 16:19:40 by maiboyer #+# #+# */
/* Updated: 2023/11/04 16:59:06 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#include "me/char/isdigit.h"
bool me_isdigit(char chr)
{
return (chr >= '0' && chr <= '9');
}

18
stdme/src/char/islower.c Normal file
View file

@ -0,0 +1,18 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* islower.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/04 16:19:40 by maiboyer #+# #+# */
/* Updated: 2023/11/04 16:58:56 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#include "me/char/islower.h"
bool me_islower(char chr)
{
return (chr >= 'a' && chr <= 'z');
}

18
stdme/src/char/isprint.c Normal file
View file

@ -0,0 +1,18 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* isprint.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/04 16:19:40 by maiboyer #+# #+# */
/* Updated: 2023/11/04 16:42:38 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#include "me/char/isprint.h"
bool me_isprint(char chr)
{
return (chr >= ' ' && chr <= '~');
}

19
stdme/src/char/isspace.c Normal file
View file

@ -0,0 +1,19 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* isspace.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/06 14:26:25 by maiboyer #+# #+# */
/* Updated: 2023/11/08 02:39:24 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#include "me/char/isspace.h"
bool me_isspace(char chr)
{
return (chr == ' ' || chr == '\f' || chr == '\n' || chr == '\r'
|| chr == '\t' || chr == '\v');
}

18
stdme/src/char/isupper.c Normal file
View file

@ -0,0 +1,18 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* isupper.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/04 16:19:40 by maiboyer #+# #+# */
/* Updated: 2023/11/08 04:01:59 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#include "me/char/isupper.h"
bool me_isupper(char chr)
{
return ('Z' >= chr && chr >= 'A');
}

22
stdme/src/char/tolower.c Normal file
View file

@ -0,0 +1,22 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* tolower.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/04 16:47:50 by maiboyer #+# #+# */
/* Updated: 2023/11/04 16:56:03 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#include "me/char/isupper.h"
#include "me/char/tolower.h"
bool me_tolower(char chr)
{
if (me_isupper(chr))
return (chr + ('a' - 'A'));
else
return (chr);
}

22
stdme/src/char/toupper.c Normal file
View file

@ -0,0 +1,22 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* toupper.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/04 16:47:50 by maiboyer #+# #+# */
/* Updated: 2023/11/04 16:51:28 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#include "me/char/islower.h"
#include "me/char/toupper.h"
bool me_toupper(char chr)
{
if (me_islower(chr))
return (chr - ('a' - 'A'));
else
return (chr);
}