Arkanjo 0.1
A tool for find code duplicated functions in codebases
|
Enumerations | |
enum | COLOR { RESET , RED , GREEN , YELLOW , BLUE , MAGENTA , CYAN , GRAY , WHITE , BRIGHT_YELLOW , BLACK } |
Enumeration of available colors for formatted messages. More... | |
Functions | |
void | ensure_file_is_open (std::ifstream &file, string file_name) |
Ensures that a file stream is successfully opened. | |
vector< string > | read_file_generic (string string_path) |
Reads a file line by line into a vector of strings. | |
void | write_file_generic (string file_path, vector< string > content) |
Writes content to a file at specified path. | |
void | create_parents_folder_of_file_path (string file_path) |
Creates all parent directories for a given file path. | |
json | read_json (string string_path) |
Reads and parses a JSON file, uses nlohmann json library. | |
bool | does_file_exist (string file_path) |
Checks if a file exists at the given path. | |
bool | is_regular_file (string path) |
Determines if a path refers to a regular file. | |
string | format_colored_message (string message, COLOR color) |
Formats a message with ANSI color codes. | |
bool | is_empty_char (char c) |
Checks if a character is considered empty/whitespace. | |
bool | is_special_char (char c) |
Checks if a character is special (non-alphanumeric and not underscore) | |
vector< string > | split_string (string s, char delimiter) |
Splits a string by a delimiter into tokens. | |
Variables | |
const string | LIMITER_PRINT = "---------------------" |
Constant string used as a visual delimiter/separator in prints. | |
const int | MKDIR_FLAG = 0700 |
Permission flags used when creating directories (rwx for owner) | |
const vector< string > | COLOR_TOKENS_UTILS_LIGTH |
ANSI color codes for light terminal backgrounds. | |
const vector< string > | COLOR_TOKENS_UTILS_DARK |
ANSI color codes for dark terminal backgrounds. | |
enum Utils::COLOR |
void Utils::create_parents_folder_of_file_path | ( | string | file_path | ) |
bool Utils::does_file_exist | ( | string | file_path | ) |
void Utils::ensure_file_is_open | ( | std::ifstream & | file, |
string | file_name ) |
string Utils::format_colored_message | ( | string | message, |
COLOR | color ) |
bool Utils::is_empty_char | ( | char | c | ) |
bool Utils::is_regular_file | ( | string | path | ) |
bool Utils::is_special_char | ( | char | c | ) |
vector< string > Utils::read_file_generic | ( | string | string_path | ) |
json Utils::read_json | ( | string | string_path | ) |
vector< string > Utils::split_string | ( | string | s, |
char | delimiter ) |
void Utils::write_file_generic | ( | string | file_path, |
vector< string > | content ) |
const vector<string> Utils::COLOR_TOKENS_UTILS_DARK |
ANSI color codes for dark terminal backgrounds.
Contains escape sequences for:
const vector<string> Utils::COLOR_TOKENS_UTILS_LIGTH |
ANSI color codes for light terminal backgrounds.
Contains escape sequences for:
const string Utils::LIMITER_PRINT = "---------------------" |