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.
-
Rich Data Structures:
- Dynamic Array (
Vector
) - Linked List (
List
) - Stack (
Stack
) - Queue (
Queue
) - Dictionary (
Map
) - Set (
Set
)
- Dynamic Array (
-
Efficient Algorithms:
- Sorting (
Sort
) - Searching (
Search
) - Finding Maximum/Minimum (
Max/Min
) - Filtering (
Filter
) - Mapping (
Map
) - Reducing (
Reduce
)
- Sorting (
-
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.
Look at example.c
to get the example.