Git Product home page Git Product logo

llib's Introduction

llib

License: MIT Language: C

๐Ÿ”ง๐Ÿ“š Utility library for C ๐Ÿ“๐Ÿ’ป

The "llib" library is a collection of standalone modules created for the purpose of reducing the need to rewrite similar code and providing alternative implementations of the standard library. This project was developed for fun and as a learning experience and also as a little challenge.

The library is composed by a series of sub-modules for better code structure and most of them are standalone, so you can just use the module you need.

Every module header is fully commented and can be used as a reference.

Inspired by https://github.com/barrust/c-utils and https://github.com/goToMain/c-utils/.

๐Ÿ“ฅ Installation ๐Ÿ“ค

To use the "llib" library, you have two alternatives:

  • simply clone the repository and include the necessary header files in your project;
  • use single modules by downloading their .h file in the include/llib directory and .c file in the src/llib directory.
  • compile llib as a static library and include the .a file in your project.

Make sure to link the library (or the modules) during compilation and update your include path.

List of modules and examples ๐Ÿ”Ž

  • memory - memory-related stuff (safe allocation, copy, swap)
  • utils - utility functions (wait, safe fopen)
  • string - string struct and related functions (create, delete, copy, compare, concat, input, etc.)
  • io - io utilities (i.e. buffer cleaning)
  • algorithms - various algorithms (searching, sorting, shuffling)

You can find examples in the examples directory and compile them using make examples.

memory

Contains memory related stuff, like safe allocation, swap and copy functions.

Example code here

utils

Contains utility functions, like wait, safe fopen

Example code here

string

Contains string struct and related functions, like create, delete, copy, compare, concat, input, etc. Also contains utility functions for normal char arrays. Note: this module isn't standalone. You will also need memory and io to use it.

Example code here

io

Contains io utility functions, like input with buffer cleaning.

Example code here

algorithms

Contains implementations of several useful algorithms for arrays, including:

  • linear and binary search for arrays;
  • sorting (currently merge sort, planning on implementing other algorithms);
  • shuffling

Note: this module isn't standalone. You will also need memory to use it.

Example code here

llib's People

Contributors

landiluigi746 avatar

Stargazers

 avatar

Watchers

 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.