|
Arkanjo 0.2
A tool for find code duplicated functions in codebases
|
Enumerations | |
| enum | COLOR { RESET , RED , GREEN , YELLOW , BLUE , MAGENTA , CYAN , GRAY , WHITE , BRIGHT_YELLOW , BLACK , BOLD , UNDERLINE , NONE } |
| Enumeration of available colors for formatted messages. More... | |
Functions | |
| void | ensure_file_is_open (const std::ifstream &file, const fs::path &file_name) |
| Ensures that a file stream is successfully opened. | |
| std::vector< std::string > | read_file_generic (const fs::path &string_path) |
| Reads a file line by line into a vector of strings. | |
| void | write_file_generic (const fs::path &file_path, const std::vector< std::string > &content) |
| Writes content to a file at specified path. | |
| json | read_json (const fs::path &string_path) |
| Reads and parses a JSON file, uses nlohmann json library. | |
| std::string | format_colored_message (const std::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) | |
| std::vector< std::string > | split_string (const std::string &s, char delimiter) |
| Splits a string by a delimiter into tokens. | |
| std::string | to_uppercase (const std::string input) |
| std::string | hash (const std::string &content) |
| Computes a simple hash of a string. | |
| std::uintmax_t | folder_size (const fs::path &folder) |
| Calculates the total size of all regular files in a folder. | |
| std::string | format_size (std::uintmax_t bytes) |
| Formats a byte size into a human-readable string. | |
| void | open_folder (const std::string &path) |
Variables | |
| const std::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 std::vector< std::string > | COLOR_TOKENS_UTILS_LIGTH |
| ANSI color codes for light terminal backgrounds. | |
| const std::vector< std::string > | COLOR_TOKENS_UTILS_DARK |
| ANSI color codes for dark terminal backgrounds. | |
| enum Utils::COLOR |
Enumeration of available colors for formatted messages.
| void Utils::ensure_file_is_open | ( | const std::ifstream & | file, |
| const fs::path & | file_name ) |
| std::uintmax_t Utils::folder_size | ( | const fs::path & | folder | ) |
| std::string Utils::format_colored_message | ( | const std::string & | message, |
| COLOR | color ) |
| std::string Utils::format_size | ( | std::uintmax_t | bytes | ) |
| std::string Utils::hash | ( | const std::string & | content | ) |
| bool Utils::is_empty_char | ( | char | c | ) |
| bool Utils::is_special_char | ( | char | c | ) |
| std::vector< std::string > Utils::read_file_generic | ( | const fs::path & | string_path | ) |
| json Utils::read_json | ( | const fs::path & | string_path | ) |
| std::vector< std::string > Utils::split_string | ( | const std::string & | s, |
| char | delimiter ) |
| std::string Utils::to_uppercase | ( | const std::string | input | ) |
| void Utils::write_file_generic | ( | const fs::path & | file_path, |
| const std::vector< std::string > & | content ) |
| const std::vector<std::string> Utils::COLOR_TOKENS_UTILS_DARK |
ANSI color codes for dark terminal backgrounds.
Contains escape sequences for:
| const std::vector<std::string> Utils::COLOR_TOKENS_UTILS_LIGTH |
ANSI color codes for light terminal backgrounds.
Contains escape sequences for:
| const std::string Utils::LIMITER_PRINT = "---------------------" |