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

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.

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.