# zelhajou/ft_core_libft architecture

> Architecture diagram of the GitHub repository zelhajou/ft_core_libft, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zelhajou/ft_core_libft
- Repository: https://github.com/zelhajou/ft_core_libft

## Overview

##### Main Components

a) Core Function Categories:
- Character Handling Functions
- String Handling Functions
- Memory Functions
- Type Conversion & Memory Allocation Functions
- Additional Utility Functions
- Linked List Functions (Bonus)

**┌─────────────────────── libft Library ───────────────────────┐**

- ┌─────────────┐ ┌─────────────┐ ┌─────────────┐          │
- Memory    │ │   String    │ │  Character  │          │
- Functions  │ │  Functions  │ │  Functions  │          │
- ┘ └─────────────┘ └─────────────┘          │

- ┌─────────────┐ ┌─────────────┐ ┌─────────────┐          │
- Type     │ │ Additional  │ │   Linked    │          │
- Conversion  │ │  Functions  │ │    List     │          │
- ┘ └─────────────┘ └─────────────┘          │

- ┌────────────────── Dependencies ───────────────────┐     │

- stdlib.h     string.h     unistd.h            │     │
- ┘     │
- ┘

##### Implementation Details

Following elements:
- Input/output parameters
- Return types
- Memory management indicators (malloc/free)

##### Documentation Integration

Include:
- Brief function descriptions
- Usage examples
- Error handling procedures
- Memory management requirements

##### Technical Specifications

Show:
- Data type limitations
- Buffer size constraints
- Platform-specific considerations
- Performance characteristics

- The modular nature of the library
- Clear separation of concerns
- Function groupings by purpose
- Memory management patterns
- Error handling strategies

Remember to:
- Keep the abstraction level appropriate for a library overview
- Clear boundaries between function categories
- Safety and security considerations
- Relevant system dependencies

- The library's architecture
- Function relationships
- Memory management patterns
- Error handling approaches
- Implementation requirements

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph libft["libft Library"]
        direction TB
        
        subgraph char["Character Functions"]
            direction TB
            isalnum["isalnum"]:::char
            isalpha["isalpha"]:::char
            isascii["isascii"]:::char
            isdigit["isdigit"]:::char
            isprint["isprint"]:::char
            tolower["tolower"]:::char
            toupper["toupper"]:::char
        end

        subgraph str["String Functions"]
            direction TB
            strlen["strlen"]:::string
            strchr["strchr"]:::string
            strrchr["strrchr"]:::string
            strncmp["strncmp"]:::string
            strlcat["strlcat"]:::string
            strlcpy["strlcpy"]:::string
            strjoin["strjoin"]:::string
            strtrim["strtrim"]:::string
            split["split"]:::string
            strmapi["strmapi"]:::string
            striteri["striteri"]:::string
            strnstr["strnstr"]:::string
        end

        subgraph mem["Memory Functions"]
            direction TB
            memset["memset"]:::memory
            memcpy["memcpy"]:::memory
            memmove["memmove"]:::memory
            memchr["memchr"]:::memory
            memcmp["memcmp"]:::memory
            bzero["bzero"]:::memory
        end

        subgraph conv["Type Conversion & Allocation"]
            direction TB
            atoi["atoi"]:::convert
            itoa["itoa"]:::convert
            calloc["calloc"]:::convert
            strdup["strdup"]:::convert
        end

        subgraph util["Additional Functions"]
            direction TB
            putchar_fd["putchar_fd"]:::util
            putstr_fd["putstr_fd"]:::util
            putendl_fd["putendl_fd"]:::util
            putnbr_fd["putnbr_fd"]:::util
            substr["substr"]:::util
        end

        subgraph lst["Linked List Functions"]
            direction TB
            lstadd_back["lstadd_back"]:::list
            lstadd_front["lstadd_front"]:::list
            lstclear["lstclear"]:::list
            lstdelone["lstdelone"]:::list
            lstiter["lstiter"]:::list
            lstlast["lstlast"]:::list
            lstnew["lstnew"]:::list
            lstsize["lstsize"]:::list
        end

        subgraph deps["Dependencies"]
            direction TB
            stdlib["stdlib.h"]:::dep
            stringh["string.h"]:::dep
            unistd["unistd.h"]:::dep
        end
    end

    %% Click events for components
    click isalnum "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_isalnum.c"
    click isalpha "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_isalpha.c"
    click isascii "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_isascii.c"
    click isdigit "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_isdigit.c"
    click isprint "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_isprint.c"
    click tolower "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_tolower.c"
    click toupper "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_toupper.c"
    
    click strlen "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_strlen.c"
    click strchr "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_strchr.c"
    click strrchr "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_strrchr.c"
    click strncmp "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_strncmp.c"
    click strlcat "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_strlcat.c"
    click strlcpy "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_strlcpy.c"
    click strjoin "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_strjoin.c"
    click strtrim "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_strtrim.c"
    click split "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_split.c"
    click strmapi "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_strmapi.c"
    click striteri "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_striteri.c"
    click strnstr "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_strnstr.c"
    
    click memset "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_memset.c"
    click memcpy "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_memcpy.c"
    click memmove "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_memmove.c"
    click memchr "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_memchr.c"
    click memcmp "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_memcmp.c"
    click bzero "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_bzero.c"
    
    click atoi "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_atoi.c"
    click itoa "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_itoa.c"
    click calloc "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_calloc.c"
    click strdup "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_strdup.c"
    
    click putchar_fd "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_putchar_fd.c"
    click putstr_fd "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_putstr_fd.c"
    click putendl_fd "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_putendl_fd.c"
    click putnbr_fd "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_putnbr_fd.c"
    click substr "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_substr.c"
    
    click lstadd_back "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_lstadd_back.c"
    click lstadd_front "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_lstadd_front.c"
    click lstclear "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_lstclear.c"
    click lstdelone "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_lstdelone.c"
    click lstiter "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_lstiter.c"
    click lstlast "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_lstlast.c"
    click lstnew "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_lstnew.c"
    click lstsize "https://github.com/zelhajou/ft_core_libft/blob/main/libft/ft_lstsize.c"

    %% Styling
    classDef char fill:#FFE873
    classDef string fill:#90EE90
    classDef memory fill:#87CEEB
    classDef convert fill:#FFA500
    classDef util fill:#DDA0DD
    classDef list fill:#B19CD9
    classDef dep fill:#D3D3D3
```
