https://github.com/byteakp/c-__library
A C++ library offering a collection of useful functions for common programming tasks, including matrix operations, sorting and searching algorithms, string manipulation, file handling, and more.
https://github.com/byteakp/c-__library
cpp library
Last synced: about 1 year ago
JSON representation
A C++ library offering a collection of useful functions for common programming tasks, including matrix operations, sorting and searching algorithms, string manipulation, file handling, and more.
- Host: GitHub
- URL: https://github.com/byteakp/c-__library
- Owner: byteakp
- License: other
- Created: 2025-01-27T20:24:26.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-27T20:31:12.000Z (over 1 year ago)
- Last Synced: 2025-04-23T10:51:28.262Z (about 1 year ago)
- Topics: cpp, library
- Language: C++
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: docs/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# C++ Utility Library
A comprehensive C++ library providing various utility functions, algorithms, and data structure operations.
## Features
- **Matrix Operations**
- Matrix multiplication
- Matrix transpose
- Matrix addition
- **Sorting Algorithms**
- Quick Sort
- Merge Sort
- Bubble Sort
- **Searching Algorithms**
- Binary Search
- Linear Search
- Find All Occurrences
- **Utility Functions**
- Factorial calculation
- Fibonacci sequence generation
- Prime number operations
- **String Manipulation**
- Case conversion
- String splitting
- Prefix/suffix checking
- **File Operations**
- File reading/writing
- Line-by-line operations
- File appending
## Requirements
- C++14 or higher
- CMake 3.14 or higher
- GTest (for building tests)
## Installation
### Using CMake
```bash
git clone https://github.com/yourusername/cpp-utility-library.git
cd cpp-utility-library
mkdir build && cd build
cmake ..
make
make install
```
### Manual Installation
1. Copy the contents of the `include` directory to your project
2. Include the necessary headers in your code
## Usage
```cpp
#include
// Matrix operations
std::vector> mat1 = {{1, 2}, {3, 4}};
std::vector> mat2 = {{5, 6}, {7, 8}};
auto result = MyLibrary::Matrix::multiply(mat1, mat2);
// Sorting
std::vector arr = {64, 34, 25, 12, 22, 11, 90};
MyLibrary::Sort::quickSort(arr, 0, arr.size() - 1);
// String operations
std::string str = "Hello World";
auto upperCase = MyLibrary::StringOps::toUpperCase(str);
```
## Building Examples
```bash
cmake -DBUILD_EXAMPLES=ON ..
make
```
Examples will be built in the `build/bin` directory.
## Running Tests
```bash
cmake -DBUILD_TESTS=ON ..
make
ctest
```
## Contributing
Please read [CONTRIBUTING.md](docs/CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Changelog
See [CHANGELOG.md](docs/CHANGELOG.md) for a list of changes in each version.