Giter Site home page Giter Site logo

libft's Introduction

libft

Este proyecto consiste en crear una librería en lenguaje C recreando varias funciones existentes de la libc y también introduciendo algunas funciones nuevas.

Mandatory

La parte obligatoria junta funciones ya existentes con algunas añadidas con las cuales se puede manipular memoria, strings, etc.

Parte 1 - Funciones de libc

Función Prototipo
isalpha int ft_isalpha(int c)
isdigit int ft_isdigit(int c)
isalnum int ft_isalnum(int c)
isascii int ft_isascii(int c)
isprint int ft_isprint(int c)
strlen size_t ft_strlen(const char *s)
memset void *ft_memset(void *s, int c, size_t n)
bzero void ft_bzero(void *s, size_t n)
memcpy void *ft_memcpy(void *dest, const void *src, size_t n)
memmove void *ft_memmove(void *dest, const void *src, size_t n)
strlcpy size_t ft_strlcpy(char *dst, const char *src, size_t size)
strlcat size_t ft_strlcat(char *dst, const char *src, size_t size)
toupper int ft_toupper(int c)
tolower int ft_tolower(int c)
strchr char *ft_strchr(const char *s, int c)
strrchr char *ft_strrchr(const char *s, int c)
strncmp int ft_strncmp(const char *s1, const char *s2, size_t n)
memchr void *ft_memchr(const void *s, int c, size_t n)
memcmp int ft_memcmp(const void *s1, const void *s2, size_t n)
strnstr char *ft_strnstr(const char *haystack, const char *needle, size_t len)
atoi int ft_atoi(const char *str)
calloc void *ft_calloc(size_t nitems, size_t size)
strdup char *ft_strdup(const char *s)

Parte 2 - Funciones adicionales

Función Prototipo
ft_substr char *ft_substr(char const *s, unsigned int start, size_t len)
ft_strjoin char *ft_strjoin(char const *s1, char const *s2)
ft_strtrim char *ft_strtrim(char const *s1, char const *set)
ft_split char **ft_split(char const *s, char c)
ft_itoa char *ft_itoa(int n)
ft_strmapi char *ft_strmapi(char const *s, char (*f)(unsigned int, char))
ft_striteri void ft_striteri(char *s, void (*f)(unsigned int, char*))
ft_putchar_fd void ft_putchar_fd(char c, int fd)
ft_putstr_fd void ft_putstr_fd(char *s, int fd)
ft_putendl_fd void ft_putendl_fd(char *s, int fd)
ft_putnbr_fd void ft_putnbr_fd(int n, int fd)

Bonus

La parte del bonus consiste en crear funciónes con las cuales crear y manipular listas enlazadas. La estructura de los nodos es la siguiente:
typedef struct s_list
{
  void *content;
  struct s_list *next;
}              t_list;
Función Prototipo
ft_lstnew t_list *ft_lstnew(void *content)
ft_lstadd_front void ft_lstadd_front(t_list **lst, t_list *new)
ft_lstsize int ft_lstsize(t_list *lst)
ft_lstlast t_list *ft_lstlast(t_list *lst)
ft_lstadd_back void ft_lstadd_back(t_list **lst, t_list *new)
ft_lstdelone void ft_lstdelone(t_list *lst, void (*del)(void *))
ft_lstclear void ft_lstclear(t_list **lst, void (*del)(void *))
ft_lstiter void ft_lstiter(t_list *lst, void (*f)(void *))
ft_lstmap t_list *ft_lstmap(t_list *lst, void *(*f)(void *), void (*del)(void *))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.