Welcome to stdx, a lightweight and modular utility library designed for C99. Inspired by the STB style, stdx provides a collection of single-header components that enhance common programming tasks without introducing dependencies. This library is perfect for developers who seek simplicity and efficiency in their C projects.
- Minimalist Design: Focus on simplicity and ease of use.
- Modular Architecture: Use only the components you need.
- Single-Header Files: Easy to integrate into your projects.
- Dependency-Free: No external libraries required.
- C99 Compliance: Fully compatible with C99 standards.
The Array component provides a dynamic array implementation that allows you to create, manipulate, and manage arrays easily. It supports resizing and provides functions for adding, removing, and accessing elements.
The Filesystem component simplifies file operations, including reading, writing, and directory manipulation. It also includes features for monitoring filesystem events, making it easier to respond to changes.
The Hashtable component offers a fast and efficient way to store key-value pairs. It supports various hashing algorithms and collision resolution techniques to ensure optimal performance.
The Logging component allows you to log messages with different severity levels. You can easily configure the logging output and format, making it suitable for debugging and monitoring applications.
The Networking component provides basic networking functionality, including TCP and UDP communication. It allows you to create client-server applications with minimal setup.
The String Manipulation component includes various functions for handling strings, such as concatenation, splitting, and searching. It also provides a StringBuilder for efficient string construction.
The Testing Library component offers a simple framework for writing and running tests. It includes assertions and test runners to help you ensure your code works as expected.
The Thread Pool component manages a pool of threads for executing tasks concurrently. It simplifies multithreading and improves performance in CPU-bound applications.
To install stdx, download the latest release from the Releases section. You can simply download the .h
file and include it in your project.
Hereโs a quick example of how to use the Array component:
#include "stdx.h"
int main() {
Array *arr = array_create(sizeof(int), 10);
int value = 42;
array_push(arr, &value);
printf("Element at index 0: %d\n", *(int *)array_get(arr, 0));
array_free(arr);
return 0;
}
This example demonstrates creating an array, adding an element, and retrieving it.
We welcome contributions to stdx. If you have suggestions, improvements, or bug fixes, please submit a pull request or open an issue. Make sure to follow the coding standards and include tests for new features.
stdx is licensed under the MIT License. See the LICENSE file for details.
For the latest updates and releases, please visit the Releases section. This section contains all the information you need about the versions, changes, and download links.
- Documentation: Comprehensive documentation is available in the
docs
folder. - Examples: Check the
examples
folder for practical usage examples of each component. - Community: Join our community on GitHub Discussions to share ideas and get help.
Thank you for considering stdx for your C programming needs. We hope you find it useful and easy to integrate into your projects.