Git Product home page Git Product logo

libft's Introduction

Libft/GNL/Printf Build and Test Status

A subset of the libc comprised of my libft GNL and printf projects, with a few extras. Compatible with GNU/Linux and MacOS with clang and hopefully GCC.

GNL

NAME get_next_line - read from a fd line per line
SYNOPSIS int get_next_line(const int fd, char **line)
DESCRIPTION the get_next_line() function stores the content of a line (array of char ending with a newline or EOF) without the trailing newline read from fd into the address of line
RETURN VALUES 1 if a line has been read, 0 if the reading has been completed, -1 if an error happened

Printf

Handled types

cCsSpdDioOuUxXb%

Functions

  • ft_dprintf
  • ft_vdprintf
  • ft_printf
  • ft_vprintf

Libft

Bonus functions

Functions from the libc:

  • ft_islower
  • ft_isupper
  • ft_strndup
  • ft_rand (kind of)

Homebrewn functions:

NAME ft_strrlen -- find length until character
SYNOPSIS size_t ft_strrlen(const char **s, char c);
DESCRIPTION The ft_strrlen() function computes the offset between the start of the string s and the character c.
RETURN VALUES The number of characters that precede the given character, or ft_strlen() if the character isn't found in the string.
NAME ft_cntword - count the number of words
SYNOPSIS int ft_cntword(char const *s, char c);
DESCRIPTION The ft_cntword() function computes the number of 'words' delimited by the character c in the NULL terminated string s. A 'word' is a section of a string delimited by a given character, excluding the first and the last character of the string.
RETURN VALUES The number of words in the string pointed by s. Otherwise 0 if s is empty or 1 if c isn't found in s (or is '\0')
NAME ft_cntdigit - count the number of digits
SYNOPSIS int ft_cntdigit(int n);
DESCRIPTION The ft_cntdigit() function computes the number of digits in the number n.
RETURN VALUE The number of digits starting from 1
NAME ft_strlowcase - converts to lowercase
SYNOPSIS char ft_strlowcase(char *s);
DESCRIPTION The ft_strlowcase() function converts uppercase characters in the string s to lowercase.
RETURN VALUE The string converted to uppercase.
NAME ft_strupcase - converts to uppercase
SYNOPSIS char ft_strupcase(char *s);
DESCRIPTION The ft_strupcase() function converts lowercase characters in the string s to uppercase.
RETURN VALUE The string converted to uppercase.

-ft_freearray -ft_strdeltab (deprecated) -ft_swap -ft_bubblesort -ft_lstnewl

Part 1 Functions (libc functions)

  • ft_memset
  • ft_bzero
  • ft_memcpy
  • ft_memccpy
  • ft_memmove
  • ft_memchr
  • ft_memcmp
  • ft_strlen
  • ft_strdup
  • ft_strcpy
  • ft_strncpy
  • ft_strcat
  • ft_strncat
  • ft_strlcat
  • ft_strchr
  • ft_strrchr
  • ft_strstr
  • ft_strnstr
  • ft_strcmp
  • ft_strncmp
  • ft_atoi
  • ft_isalpha
  • ft_isdigit
  • ft_isalnum
  • ft_isascii
  • ft_isprint
  • ft_toupper
  • ft_tolower

Part 2 Functions

  • ft_itoa
  • ft_memalloc
  • ft_memdel
  • ft_putchar
  • ft_putchar_fd
  • ft_putendl
  • ft_putendl_fd
  • ft_putnbr
  • ft_putnbr_fd
  • ft_putstr
  • ft_putstr_fd
  • ft_strclr
  • ft_strdel
  • ft_strequ
  • ft_striter
  • ft_striteri
  • ft_strjoin
  • ft_strmap
  • ft_strmapi
  • ft_strnequ
  • ft_strnew
  • ft_strsplit
  • ft_strsub
  • ft_strtrim

libft's People

Contributors

selfsigned avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

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.