-
Brandon Rodriguez authored
Add ANSI text color codes and second string helper function.
7d13a69f
HelperHeader.h 859 B
/**
* Brandon Rodriguez
* CS 3240
* 09-19-17
*/
/**
* A personal header for helper-functions.
*/
// ANSI color escape codes.
#define ANSI_COLOR_RESET "\x1b[0m"
#define ANSI_COLOR_RED "\x1b[31m"
#define ANSI_COLOR_GREEN "\x1b[32m"
#define ANSI_COLOR_YELLOW "\x1b[33m"
#define ANSI_COLOR_BLUE "\x1b[34m"
#define ANSI_COLOR_MAGENTA "\x1b[35m"
#define ANSI_COLOR_CYAN "\x1b[36m"
// Function prototypes.
char* copy_string(char* source_ptr);
char* copy_string_with_buffer(char* source_ptr, int buffer_size);
int* copy_int(int* source_ptr);
float* copy_float(float* source_ptr);
double* copy_double(double* source_ptr);
char* to_lower_case(char* input_string);
char* to_upper_case(char* input_string);
char* first_letter_upper(char* input_string);
char* remove_quotes(char* input_string);
char* remove_newline(char* input_string);