docs(char): moving the actual documentation on the header
- The documentation on the header allow u to see on the files where the header is inclued
This commit is contained in:
parent
78c37163f2
commit
63c1dea7a2
8 changed files with 56 additions and 50 deletions
|
|
@ -6,18 +6,12 @@
|
||||||
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/11/06 12:47:28 by rparodi #+# #+# */
|
/* Created: 2023/11/06 12:47:28 by rparodi #+# #+# */
|
||||||
/* Updated: 2025/09/04 18:12:52 by rparodi ### ########.fr */
|
/* Updated: 2025/09/05 16:01:38 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#include "char.h"
|
#include "char.h"
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Check if the character is alpha-numeric
|
|
||||||
*
|
|
||||||
* @param c the character
|
|
||||||
* @return the character if alphanumeric or 0 if not
|
|
||||||
*/
|
|
||||||
int ft_isalnum(int c)
|
int ft_isalnum(int c)
|
||||||
{
|
{
|
||||||
if (ft_isalpha(c) || ft_isdigit(c))
|
if (ft_isalpha(c) || ft_isdigit(c))
|
||||||
|
|
|
||||||
|
|
@ -6,16 +6,10 @@
|
||||||
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/11/06 11:58:37 by rparodi #+# #+# */
|
/* Created: 2023/11/06 11:58:37 by rparodi #+# #+# */
|
||||||
/* Updated: 2025/09/04 18:13:06 by rparodi ### ########.fr */
|
/* Updated: 2025/09/05 16:03:14 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Check if the character is alpha
|
|
||||||
*
|
|
||||||
* @param c the character
|
|
||||||
* @return the character if alpha or 0 if not
|
|
||||||
*/
|
|
||||||
int ft_isalpha(int c)
|
int ft_isalpha(int c)
|
||||||
{
|
{
|
||||||
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
|
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
|
||||||
|
|
|
||||||
|
|
@ -6,16 +6,10 @@
|
||||||
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/11/06 14:04:26 by rparodi #+# #+# */
|
/* Created: 2023/11/06 14:04:26 by rparodi #+# #+# */
|
||||||
/* Updated: 2025/09/05 10:40:03 by rparodi ### ########.fr */
|
/* Updated: 2025/09/05 16:01:13 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Check if the character is in the ascii table
|
|
||||||
*
|
|
||||||
* @param c the character
|
|
||||||
* @return the character if in the ascii table or 0 if not
|
|
||||||
*/
|
|
||||||
int ft_isascii(int c)
|
int ft_isascii(int c)
|
||||||
{
|
{
|
||||||
if (c == 0)
|
if (c == 0)
|
||||||
|
|
|
||||||
|
|
@ -6,16 +6,10 @@
|
||||||
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/11/06 12:44:28 by rparodi #+# #+# */
|
/* Created: 2023/11/06 12:44:28 by rparodi #+# #+# */
|
||||||
/* Updated: 2025/09/04 18:13:17 by rparodi ### ########.fr */
|
/* Updated: 2025/09/05 16:00:16 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Check if the character is alpha numeric
|
|
||||||
*
|
|
||||||
* @param c the character
|
|
||||||
* @return the character if numeric or 0 if not
|
|
||||||
*/
|
|
||||||
int ft_isdigit(int c)
|
int ft_isdigit(int c)
|
||||||
{
|
{
|
||||||
if (c >= '0' && c <= '9')
|
if (c >= '0' && c <= '9')
|
||||||
|
|
|
||||||
|
|
@ -6,16 +6,10 @@
|
||||||
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/11/06 14:06:53 by rparodi #+# #+# */
|
/* Created: 2023/11/06 14:06:53 by rparodi #+# #+# */
|
||||||
/* Updated: 2025/09/05 10:44:13 by rparodi ### ########.fr */
|
/* Updated: 2025/09/05 16:03:14 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Check if the character is printable
|
|
||||||
*
|
|
||||||
* @param c the character
|
|
||||||
* @return the character if can be print or 0 if not
|
|
||||||
*/
|
|
||||||
int ft_isprint(int c)
|
int ft_isprint(int c)
|
||||||
{
|
{
|
||||||
if (c >= 32 && c <= 126)
|
if (c >= 32 && c <= 126)
|
||||||
|
|
|
||||||
|
|
@ -6,16 +6,10 @@
|
||||||
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/11/07 10:38:54 by rparodi #+# #+# */
|
/* Created: 2023/11/07 10:38:54 by rparodi #+# #+# */
|
||||||
/* Updated: 2025/09/04 11:42:13 by rparodi ### ########.fr */
|
/* Updated: 2025/09/05 16:00:45 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief convert the upper case to lower case
|
|
||||||
*
|
|
||||||
* @param c the character
|
|
||||||
* @return the character to lower case if is on upper
|
|
||||||
*/
|
|
||||||
int ft_tolower(int c)
|
int ft_tolower(int c)
|
||||||
{
|
{
|
||||||
if (c >= 'A' && c <= 'Z')
|
if (c >= 'A' && c <= 'Z')
|
||||||
|
|
|
||||||
|
|
@ -6,16 +6,10 @@
|
||||||
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/11/07 10:44:26 by rparodi #+# #+# */
|
/* Created: 2023/11/07 10:44:26 by rparodi #+# #+# */
|
||||||
/* Updated: 2025/09/04 11:41:57 by rparodi ### ########.fr */
|
/* Updated: 2025/09/05 16:00:45 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief convert the lower case to upper case
|
|
||||||
*
|
|
||||||
* @param c the character
|
|
||||||
* @return the character to upper case if is on lower
|
|
||||||
*/
|
|
||||||
int ft_toupper(int c)
|
int ft_toupper(int c)
|
||||||
{
|
{
|
||||||
if (c >= 'a' && c <= 'z')
|
if (c >= 'a' && c <= 'z')
|
||||||
|
|
|
||||||
|
|
@ -6,19 +6,67 @@
|
||||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/10/31 14:54:04 by rparodi #+# #+# */
|
/* Created: 2024/10/31 14:54:04 by rparodi #+# #+# */
|
||||||
/* Updated: 2025/09/01 18:26:44 by rparodi ### ########.fr */
|
/* Updated: 2025/09/05 16:06:07 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#ifndef CHAR_H
|
#ifndef CHAR_H
|
||||||
# define CHAR_H
|
# define CHAR_H
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Check if the character is alpha-numeric
|
||||||
|
*
|
||||||
|
* @param c the character
|
||||||
|
* @return 1 if the char is alpha-numeric overwise 0
|
||||||
|
*/
|
||||||
int ft_isalnum(int c);
|
int ft_isalnum(int c);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Check if the character is alpha
|
||||||
|
*
|
||||||
|
* @param c the character
|
||||||
|
* @return 1 if the char is alphabetic overwise 0
|
||||||
|
*/
|
||||||
int ft_isalpha(int c);
|
int ft_isalpha(int c);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Check if the character is in the ascii table
|
||||||
|
*
|
||||||
|
* @param c the character
|
||||||
|
* @return 1 if the char is ascii overwise 0
|
||||||
|
*/
|
||||||
int ft_isascii(int c);
|
int ft_isascii(int c);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Check if the character is numeric
|
||||||
|
*
|
||||||
|
* @param c the character
|
||||||
|
* @return 1 if the char is numeric overwise 0
|
||||||
|
*/
|
||||||
int ft_isdigit(int c);
|
int ft_isdigit(int c);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Check if the character is printable
|
||||||
|
*
|
||||||
|
* @param c the character
|
||||||
|
* @return 1 if the char is printable 0
|
||||||
|
*/
|
||||||
int ft_isprint(int c);
|
int ft_isprint(int c);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief convert the upper case to lower case
|
||||||
|
*
|
||||||
|
* @param c the character
|
||||||
|
* @return the character to lower case if is on upper
|
||||||
|
*/
|
||||||
int ft_tolower(int c);
|
int ft_tolower(int c);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief convert the lower case to upper case
|
||||||
|
*
|
||||||
|
* @param c the character
|
||||||
|
* @return the character to upper case if is on lower
|
||||||
|
*/
|
||||||
int ft_toupper(int c);
|
int ft_toupper(int c);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue