libft

Проект “Libft”

Vim C Mac OS GitHub

Описание проекта

Основная задача данного проекта – это воссоздание некоторых основополагающих функций стандартной библиотеки С для дальнейшего использования их в собственных проектах. В свою очередь, целью этого является изучение структур данных, основных алгоритмов, а также более глубокое понимание как работают стандартные функции библиотеки С.

Список доступных функций

  • ft_atoi – convert ASCII string to integer.
  • ft_bzero – write zeroes to a byte string.
  • ft_isalnum – alphanumeric character test.
  • ft_isalpha – alphabetic character test.
  • ft_isascii – test for ASCII character.
  • ft_isdigit – decimal-digit character test.
  • ft_isprint – printing character test (space character inclusive).
  • ft_itoa – convert integer to ASCII string.
  • ft_lstadd_back – add new element at end of list.
  • ft_lstadd_front – add new element at beginning of list.
  • ft_lstclear – delete sequence of elements of list from a starting point.
  • ft_lstdelone– delete element from list.
  • ft_lstiter– apply function to content of all list’s elements.
  • ft_lstlast – find last element of list.
  • ft_lstmap – apply function to content of all list’s elements into new list.
  • ft_lstnew – create new list.
  • ft_lstsize – count elements of a list.
  • ft_memccpy – copy string until character found.
  • ft_memchr – locate byte in byte string.
  • ft_memcmp – compare byte string.
  • ft_memcpy– copy memory area.
  • ft_memmove– copy byte string.
  • ft_memset – write a byte to a byte string.
  • ft_putchar_fd – output a character to given file.
  • ft_putendl_fd – output string to given file with newline.
  • ft_putnbr_fd – output integer to given file.
  • ft_putstr_fd – output string to given file.
  • ft_split – split string, with specified character as delimiter, into an array of strings.
  • ft_strchr – locate character in string (first occurrence).
  • ft_strdup – save a copy of a string (with malloc).
  • ft_strjoin – concatenate two strings into a new string (with malloc).
  • ft_strlcat – size-bounded string concatenation.
  • ft_strlcpy – size-bounded string copying.
  • ft_strlen – find length of string.
  • ft_strmapi – create new string from modifying string with specified function.
  • ft_strncmp – compare strings (size-bounded).
  • ft_strnstr – locate a substring in a string (size-bounded).
  • ft_strrchr – locate character in string (last occurence).
  • ft_strtrim – trim beginning and end of string with the specified characters.
  • ft_substr – extract substring from string.
  • ft_tolower – upper case to lower case letter conversion.
  • ft_toupper – lower case to upper case letter conversion.

Использование

1. Клонирование и компиляция библиотеки

git clone https://github.com/Dronoti/libft.git libft && cd libft && make && make clean

2. Использование в коде

Для использования функций библиотеки в коде необходимо подключить заголовочный файл

#include "libft.h"

и добавить библиотеку при компиляции проекта

path/to/libft.a -I path/to/libft.h

Дополнительно

Подробное описание функций библиотеки, ограничения и требования к ее реализации описаны в задании.

Visit original content creator repository

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *