# yildirimmmm/libft architecture

> Architecture diagram of the GitHub repository yildirimmmm/libft, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yildirimmmm/libft
- Repository: https://github.com/yildirimmmm/libft
- Video tour (about a minute): https://gitdiagram.com/yildirimmmm/libft/video

## Overview

Libft is a reusable C utility library whose workflow is a consuming program calling its declared functions to process memory, strings, characters, and conversions, or write formatted values to a file descriptor. It has no single orchestrated pipeline: callers choose individual functions. The header declarations and README support the API and capability map; sampled implementations also show a few direct helper calls, included below.

Main entry points: [`libft.h`](https://github.com/yildirimmmm/libft/blob/main/libft.h) (Public API), [`ft_strlen.c`](https://github.com/yildirimmmm/libft/blob/main/ft_strlen.c) (String length), [`ft_substr.c`](https://github.com/yildirimmmm/libft/blob/main/ft_substr.c) (Extract substring), [`ft_strlcat.c`](https://github.com/yildirimmmm/libft/blob/main/ft_strlcat.c) (Bounded concatenate)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_memory["Memory"]
  node_memset["Set memory<br/>[ft_memset.c]"]
  node_bzero["Zero memory<br/>[ft_bzero.c]"]
  node_memcpy["Copy memory<br/>[ft_memcpy.c]"]
  node_memmove["Overlap-safe copy<br/>[ft_memmove.c]"]
  node_memchr["Find byte<br/>[ft_memchr.c]"]
  node_memcmp["Compare memory<br/>[ft_memcmp.c]"]
  node_calloc["Allocate zeroed<br/>[ft_calloc.c]"]
end

subgraph group_strings["Strings"]
  node_strlen["String length<br/>[ft_strlen.c]"]
  node_strlcpy["Bounded copy<br/>[ft_strlcpy.c]"]
  node_strlcat["Bounded concatenate<br/>[ft_strlcat.c]"]
  node_strchr["Find first character<br/>[ft_strchr.c]"]
  node_strrchr["Find last character<br/>[ft_strrchr.c]"]
  node_strncmp["Compare strings<br/>[ft_strncmp.c]"]
  node_strnstr["Find substring<br/>[ft_strnstr.c]"]
  node_strdup["Duplicate string<br/>[ft_strdup.c]"]
  node_substr["Extract substring<br/>[ft_substr.c]"]
  node_strjoin["Join strings<br/>[ft_strjoin.c]"]
  node_strtrim["Trim string<br/>[ft_strtrim.c]"]
  node_split["Split string<br/>[ft_split.c]"]
  node_strmapi["Map characters<br/>[ft_strmapi.c]"]
  node_striteri["Iterate characters<br/>[ft_striteri.c]"]
end

subgraph group_chars["Characters"]
  node_isalpha["Alphabetic check<br/>[ft_isalpha.c]"]
  node_isdigit["Digit check<br/>[ft_isdigit.c]"]
  node_isalnum["Alphanumeric check<br/>[ft_isalnum.c]"]
  node_isascii["ASCII check<br/>[ft_isascii.c]"]
  node_isprint["Printable check<br/>[ft_isprint.c]"]
  node_toupper["Uppercase conversion<br/>[ft_toupper.c]"]
  node_tolower["Lowercase conversion<br/>[ft_tolower.c]"]
end

subgraph group_convert_output["Convert and Output"]
  node_atoi["Parse integer<br/>[ft_atoi.c]"]
  node_itoa["Format integer<br/>[ft_itoa.c]"]
  node_putchar["Write character<br/>[ft_putchar_fd.c]"]
  node_putstr["Write string<br/>[ft_putstr_fd.c]"]
end

node_consumer(("C program"))
node_api["Public API<br/>[libft.h]"]

node_consumer -->|"uses"| node_api
node_api -->|"declares"| node_memset
node_api -->|"declares"| node_bzero
node_api -->|"declares"| node_memcpy
node_api -->|"declares"| node_memmove
node_api -->|"declares"| node_memchr
node_api -->|"declares"| node_memcmp
node_api -->|"declares"| node_calloc
node_api -->|"declares"| node_strlen
node_api -->|"declares"| node_strlcpy
node_api -->|"declares"| node_strlcat
node_api -->|"declares"| node_strchr
node_api -->|"declares"| node_strrchr
node_api -->|"declares"| node_strncmp
node_api -->|"declares"| node_strnstr
node_api -->|"declares"| node_strdup
node_api -->|"declares"| node_substr
node_api -->|"declares"| node_strjoin
node_api -->|"declares"| node_strtrim
node_api -->|"declares"| node_split
node_api -->|"declares"| node_strmapi
node_api -->|"declares"| node_striteri
node_api -->|"declares"| node_isalpha
node_api -->|"declares"| node_isdigit
node_api -->|"declares"| node_isalnum
node_api -->|"declares"| node_isascii
node_api -->|"declares"| node_isprint
node_api -->|"declares"| node_toupper
node_api -->|"declares"| node_tolower
node_api -->|"declares"| node_atoi
node_api -->|"declares"| node_itoa
node_api -->|"declares"| node_putchar
node_api -->|"declares"| node_putstr
node_strlcat -->|"calls"| node_strlen
node_strjoin -->|"calls"| node_strlen
node_substr -->|"calls"| node_strlen
node_substr -->|"calls"| node_strdup
node_strtrim -->|"calls"| node_strlen
node_strmapi -->|"calls"| node_strlen

click node_api "https://github.com/yildirimmmm/libft/blob/main/libft.h"
click node_memset "https://github.com/yildirimmmm/libft/blob/main/ft_memset.c"
click node_bzero "https://github.com/yildirimmmm/libft/blob/main/ft_bzero.c"
click node_memcpy "https://github.com/yildirimmmm/libft/blob/main/ft_memcpy.c"
click node_memmove "https://github.com/yildirimmmm/libft/blob/main/ft_memmove.c"
click node_memchr "https://github.com/yildirimmmm/libft/blob/main/ft_memchr.c"
click node_memcmp "https://github.com/yildirimmmm/libft/blob/main/ft_memcmp.c"
click node_calloc "https://github.com/yildirimmmm/libft/blob/main/ft_calloc.c"
click node_strlen "https://github.com/yildirimmmm/libft/blob/main/ft_strlen.c"
click node_strlcpy "https://github.com/yildirimmmm/libft/blob/main/ft_strlcpy.c"
click node_strlcat "https://github.com/yildirimmmm/libft/blob/main/ft_strlcat.c"
click node_strchr "https://github.com/yildirimmmm/libft/blob/main/ft_strchr.c"
click node_strrchr "https://github.com/yildirimmmm/libft/blob/main/ft_strrchr.c"
click node_strncmp "https://github.com/yildirimmmm/libft/blob/main/ft_strncmp.c"
click node_strnstr "https://github.com/yildirimmmm/libft/blob/main/ft_strnstr.c"
click node_strdup "https://github.com/yildirimmmm/libft/blob/main/ft_strdup.c"
click node_substr "https://github.com/yildirimmmm/libft/blob/main/ft_substr.c"
click node_strjoin "https://github.com/yildirimmmm/libft/blob/main/ft_strjoin.c"
click node_strtrim "https://github.com/yildirimmmm/libft/blob/main/ft_strtrim.c"
click node_split "https://github.com/yildirimmmm/libft/blob/main/ft_split.c"
click node_strmapi "https://github.com/yildirimmmm/libft/blob/main/ft_strmapi.c"
click node_striteri "https://github.com/yildirimmmm/libft/blob/main/ft_striteri.c"
click node_isalpha "https://github.com/yildirimmmm/libft/blob/main/ft_isalpha.c"
click node_isdigit "https://github.com/yildirimmmm/libft/blob/main/ft_isdigit.c"
click node_isalnum "https://github.com/yildirimmmm/libft/blob/main/ft_isalnum.c"
click node_isascii "https://github.com/yildirimmmm/libft/blob/main/ft_isascii.c"
click node_isprint "https://github.com/yildirimmmm/libft/blob/main/ft_isprint.c"
click node_toupper "https://github.com/yildirimmmm/libft/blob/main/ft_toupper.c"
click node_tolower "https://github.com/yildirimmmm/libft/blob/main/ft_tolower.c"
click node_atoi "https://github.com/yildirimmmm/libft/blob/main/ft_atoi.c"
click node_itoa "https://github.com/yildirimmmm/libft/blob/main/ft_itoa.c"
click node_putchar "https://github.com/yildirimmmm/libft/blob/main/ft_putchar_fd.c"
click node_putstr "https://github.com/yildirimmmm/libft/blob/main/ft_putstr_fd.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_memset,node_bzero,node_memcpy,node_memmove,node_memchr,node_memcmp,node_calloc toneBlue
class node_strlen,node_strlcpy,node_strlcat,node_strchr,node_strrchr,node_strncmp,node_strnstr,node_strdup,node_substr,node_strjoin,node_strtrim,node_split,node_strmapi,node_striteri toneAmber
class node_isalpha,node_isdigit,node_isalnum,node_isascii,node_isprint,node_toupper,node_tolower,node_api toneMint
class node_atoi,node_itoa,node_putchar,node_putstr toneRose
class node_consumer toneIndigo
```

## Components

### Memory

- [Set memory](https://github.com/yildirimmmm/libft/blob/main/ft_memset.c): `ft_memset.c`
- [Zero memory](https://github.com/yildirimmmm/libft/blob/main/ft_bzero.c): `ft_bzero.c`
- [Copy memory](https://github.com/yildirimmmm/libft/blob/main/ft_memcpy.c): `ft_memcpy.c`
- [Overlap-safe copy](https://github.com/yildirimmmm/libft/blob/main/ft_memmove.c): `ft_memmove.c`
- [Find byte](https://github.com/yildirimmmm/libft/blob/main/ft_memchr.c): `ft_memchr.c`
- [Compare memory](https://github.com/yildirimmmm/libft/blob/main/ft_memcmp.c): `ft_memcmp.c`
- [Allocate zeroed](https://github.com/yildirimmmm/libft/blob/main/ft_calloc.c): `ft_calloc.c`

### Strings

- [String length](https://github.com/yildirimmmm/libft/blob/main/ft_strlen.c): `ft_strlen.c`
- [Bounded copy](https://github.com/yildirimmmm/libft/blob/main/ft_strlcpy.c): `ft_strlcpy.c`
- [Bounded concatenate](https://github.com/yildirimmmm/libft/blob/main/ft_strlcat.c): `ft_strlcat.c`
- [Find first character](https://github.com/yildirimmmm/libft/blob/main/ft_strchr.c): `ft_strchr.c`
- [Find last character](https://github.com/yildirimmmm/libft/blob/main/ft_strrchr.c): `ft_strrchr.c`
- [Compare strings](https://github.com/yildirimmmm/libft/blob/main/ft_strncmp.c): `ft_strncmp.c`
- [Find substring](https://github.com/yildirimmmm/libft/blob/main/ft_strnstr.c): `ft_strnstr.c`
- [Duplicate string](https://github.com/yildirimmmm/libft/blob/main/ft_strdup.c): `ft_strdup.c`
- [Extract substring](https://github.com/yildirimmmm/libft/blob/main/ft_substr.c): `ft_substr.c`
- [Join strings](https://github.com/yildirimmmm/libft/blob/main/ft_strjoin.c): `ft_strjoin.c`
- [Trim string](https://github.com/yildirimmmm/libft/blob/main/ft_strtrim.c): `ft_strtrim.c`
- [Split string](https://github.com/yildirimmmm/libft/blob/main/ft_split.c): `ft_split.c`
- [Map characters](https://github.com/yildirimmmm/libft/blob/main/ft_strmapi.c): `ft_strmapi.c`
- [Iterate characters](https://github.com/yildirimmmm/libft/blob/main/ft_striteri.c): `ft_striteri.c`

### Characters

- [Alphabetic check](https://github.com/yildirimmmm/libft/blob/main/ft_isalpha.c): `ft_isalpha.c`
- [Digit check](https://github.com/yildirimmmm/libft/blob/main/ft_isdigit.c): `ft_isdigit.c`
- [Alphanumeric check](https://github.com/yildirimmmm/libft/blob/main/ft_isalnum.c): `ft_isalnum.c`
- [ASCII check](https://github.com/yildirimmmm/libft/blob/main/ft_isascii.c): `ft_isascii.c`
- [Printable check](https://github.com/yildirimmmm/libft/blob/main/ft_isprint.c): `ft_isprint.c`
- [Uppercase conversion](https://github.com/yildirimmmm/libft/blob/main/ft_toupper.c): `ft_toupper.c`
- [Lowercase conversion](https://github.com/yildirimmmm/libft/blob/main/ft_tolower.c): `ft_tolower.c`

### Convert and Output

- [Parse integer](https://github.com/yildirimmmm/libft/blob/main/ft_atoi.c): `ft_atoi.c`
- [Format integer](https://github.com/yildirimmmm/libft/blob/main/ft_itoa.c): `ft_itoa.c`
- [Write character](https://github.com/yildirimmmm/libft/blob/main/ft_putchar_fd.c): `ft_putchar_fd.c`
- [Write string](https://github.com/yildirimmmm/libft/blob/main/ft_putstr_fd.c): `ft_putstr_fd.c`

### Other components

- **C program**
- [Public API](https://github.com/yildirimmmm/libft/blob/main/libft.h): `libft.h`

## Connections

- C program → Public API: uses
- Public API → Set memory: declares
- Public API → Zero memory: declares
- Public API → Copy memory: declares
- Public API → Overlap-safe copy: declares
- Public API → Find byte: declares
- Public API → Compare memory: declares
- Public API → Allocate zeroed: declares
- Public API → String length: declares
- Public API → Bounded copy: declares
- Public API → Bounded concatenate: declares
- Public API → Find first character: declares
- Public API → Find last character: declares
- Public API → Compare strings: declares
- Public API → Find substring: declares
- Public API → Duplicate string: declares
- Public API → Extract substring: declares
- Public API → Join strings: declares
- Public API → Trim string: declares
- Public API → Split string: declares
- Public API → Map characters: declares
- Public API → Iterate characters: declares
- Public API → Alphabetic check: declares
- Public API → Digit check: declares
- Public API → Alphanumeric check: declares
- Public API → ASCII check: declares
- Public API → Printable check: declares
- Public API → Uppercase conversion: declares
- Public API → Lowercase conversion: declares
- Public API → Parse integer: declares
- Public API → Format integer: declares
- Public API → Write character: declares
- Public API → Write string: declares
- Bounded concatenate → String length: calls
- Join strings → String length: calls
- Extract substring → String length: calls
- Extract substring → Duplicate string: calls
- Trim string → String length: calls
- Map characters → String length: calls
