An open API service indexing awesome lists of open source software.

https://github.com/chihaya-yuka/cstl

STL for C ⭐
https://github.com/chihaya-yuka/cstl

c c-language c-plus-plus cpp stl stl-algorithms

Last synced: 3 months ago
JSON representation

STL for C ⭐

Awesome Lists containing this project

README

        

# CSTL - Standard Template Library for C ⭐



![CSTL Logo](/.github/logo.png)

![GitHub](https://img.shields.io/github/license/Chihaya-Yuka/CSTL) [![Website](https://img.shields.io/badge/Website-online-brightgreen)](https://cstl.awaland.xyz/) [![Issues](https://img.shields.io/github/issues/Chihaya-Yuka/CSTL?color=16a34a&label=Issues&style=flat-square)](https://github.com/Chihaya-Yuka/CSTL/issues) [![Contributors](https://img.shields.io/github/contributors/Chihaya-Yuka/CSTL?color=16a34a&label=Contributors&style=flat-square)](https://github.com/Chihaya-Yuka/CSTL/graphs/contributors) [![Commit Activity](https://img.shields.io/github/commit-activity/m/Chihaya-Yuka/CSTL?color=16a34a&label=Commit%20Activity&style=flat-square)](https://github.com/Chihaya-Yuka/CSTL/graphs/commit-activity)


**CSTL** is a standard template library for the C programming language, designed to provide a more modern programming experience for C language embedded developers. With CSTL, you can use common data structures and algorithms to improve the efficiency and readability of your C code.

CSTL is an open-source project. If you have any suggestions or encounter issues while using it, please feel free to provide feedback through [Issues](https://github.com/Chihaya-Yuka/CSTL/issues).

## Features

- **Rich Data Structures**:
- Dynamic Array (`Vector`)
- Linked List (`List`)
- Stack (`Stack`)
- Queue (`Queue`)
- Dictionary (`Map`)
- Set (`Set`)

- **Efficient Algorithms**:
- Sorting (`Sort`)
- Searching (`Search`)
- Finding Maximum/Minimum (`Max/Min`)
- Filtering (`Filter`)
- Mapping (`Map`)
- Reducing (`Reduce`)

- **Function Objects**: Supports unary and binary function objects, predicates, etc., for various operations within algorithms.

- **Generic Interfaces**: All data structures and algorithms are implemented with generic interfaces, supporting generic programming.

- **Simple and Easy to Use**: API design similar to C++ STL, making it easy for C developers to get started.

## Example

Look at `example.c` to get the example.