Git Product home page Git Product logo

leaf-c-extended-library's Introduction

Leaf C Extended Library

Leaf C Extended Library is a simple and easy to use C/C++ library that allows programmers to safely use strings, cryptography, and more while maintaining excellent performance and portability!

Strings

With our string library, you can use dynamically allocated strings with less pain because the string library automatically reallocates more memory when necessary and you can increase the optimization level of the amount of reallocation to allocate more than necessary characters. As a bonus, it is possible to use the string lib without malloc'ing it too!

You: Ok. How can I use it?

A very simple way to use the library dynamically...

jtr_t *str = malloc(sizeof(jtr_t));
str->optimization_level = 0.5; // optional
jtrnew(str, "Hello ");
jtrcat(str, "World!");
printf("Example String: %s\n", str->text);
jtrfree(str);
free(str);

Without malloc:

jtr_t str = {0};
str.optimization_level = 0.5; // optional
jtrnew(&str, "Hello ");
jtrcat(&str, "World!");
printf("Example String: %s\n", str.text);
jtrfree(str);

Crypto

Sorry, I have not added anything to crypto yet :/

Installing

Just copy the include/leaflib/... into your project and you are good to go (don't need to worry about license bc it uses MIT-0 (no attribution)).

Features

  • Has very high interoperability with C strings
  • Can specify the optimization level for each string struct (whether to realloc more in advance if the string is going to get very big)
  • High Performance
  • Very small
  • Highly Portable

Upcoming Features

  • Add similar functionality to "sprintf" in this library

leaf-c-extended-library's People

Contributors

suncloudsmoon avatar

Stargazers

 avatar

Watchers

 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.