Skip to content

Conversation

@gyokuro-dev
Copy link
Owner

No description provided.

@gyokuro-dev gyokuro-dev changed the title Day 1-3. CUNIX_2 Aug 25, 2021
@@ -0,0 +1,6 @@
#include "../libft.h"

int abs(int i)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ft_abs

@@ -0,0 +1,12 @@
#include "../libft.h"

void bzero(void *s, size_t n)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ft_bzero

@@ -0,0 +1,15 @@
#include "../libft.h"

char *strdup(const char *str)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ft_strdup

@@ -0,0 +1,6 @@
#include "../libft.h"

int fr_isalpha(int c)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ft_

Comment on lines +4 to +22
#include <stdlib.h>
#include <stdarg.h>
#include <unistd.h>

void ft_printf(char *format, ...);

char *ft_itoa(int val, int base);

unsigned int ft_strlen(char *str);

int ft_atoi(const char *str);

void my_print_buf(char *buf, int align, int len);

void my_print_char(char ch, int align);

void my_print_str(char *str, int align);

void my_pad_with_zeros(int num, int len);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rarely see anyone adding spacing inside include guards

Comment on lines +11 to +18
if (str1_cp[i] == str2_cp[i])
{
i++;
}
else
{
return (str1_cp[i] - str2_cp[i]);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (some condition to break)
{
return
}

continue iteration


int ft_tolower(int c)
{
return (c >= 'A' && c <= 'Z') ? c += 32 : c;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c - 32


int ft_tolower(int c)
{
return (c >= 'A' && c <= 'Z') ? c += 32 : c;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c + 32


int ft_tolower(int c)
{
return (c >= 'A' && c <= 'Z') ? c += 32 : c;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c + 32 : c


int ft_toupper(int c)
{
return (c >= 'a' && c <= 'z') ? c -= 32 : c;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c - 32 : c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants