The clsUtil library provides a set of utility functions for generating random numbers, characters, words, and keys, as well as array operations, swapping values, text encryption/decryption, and text formatting. This library is designed to simplify common programming tasks in C++.
- Random number generation
- Random character, word, and key generation
- Array operations (filling with random values, shuffling, swapping)
- Basic encryption and decryption
- String formatting utilities
Include clsUtil.h in your project and ensure that it is in the correct include path.
#include "clsUtil.h"int randomNum = clsUtil::RandomNumber(1, 100);char randomChar = clsUtil::GetRandomCharacter(clsUtil::CapitalLetter);string word = clsUtil::GenerateWord(clsUtil::MixChars, 8);string key = clsUtil::GenerateKey();int arr[100];
clsUtil::FillArrayWithRandomNumbers(arr, 10, 1, 100);string words[100];
clsUtil::FillArrayWithRandomWords(words, 10, clsUtil::CapitalLetter, 5);clsUtil::ShuffleArray(arr, 10);
clsUtil::ShuffleArray(words, 10);int a = 10, b = 20;
clsUtil::Swap(a, b);string encrypted = clsUtil::EncryptText("Hello", 3);
string decrypted = clsUtil::DecryptText(encrypted, 3);This project is licensed under the MIT License - see the LICENSE file for details.
Chiheb Abiza