de momento ya llevo esto hecho:
Código:
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Functions in Snaked Library 1.0
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void bubble_sort( int a[], int n );
DESCRIPTION: this function sort a array of int elements
IN: array of int numbers - number of elements
RETURN: nothing
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
char* trim(char* str);
DESCRIPTION: This function erase the spaces into the string
IN: char* string
RETURN: char* string trimmed (erase spaces)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
char* reverse(char* str);
DESCRIPTION: This function reverse the string
IN: char* string
RETURN: the same string but reversed
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int isNumeric(const char* str);
DESCRIPTION: This function say us if the string is numeric
IN: char* string
RETURN: int value (0 - No valid number 1 - Valid numeric string)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void toLower(char* str);
DESCRIPTION: This function change the characters to lowercase
IN: char* string
RETURN: nothing
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void PlayWAV(const char* ruta);
DESCRIPTION: This function play a WAV sound file using PlaySound Windows API func
IN: char* string with path and wav file
RETURN: nothing
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool SwitchGraphicMode(int width, int height, int bpp, int frequency);
DESCRIPTION: This function switch the Graphic Mode in the Desktop
IN: int width - int height - int bpp (bits per pixel) - int frequency
RETURN: int value (0 - Success - other values - Error)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void SaveOriginalGraphicMode()
DESCRIPTION: This function save the current Graphic Mode of the machine
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void RestoreOriginalGraphicMode()
DESCRIPTION: This function restore the original graphic mode previously saved
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool IsValidEmail(const char* email);
DESCRIPTION: This function validate a correct email address
IN: char* string with email
RETURN: int value (1 (True) - Success - 0 (False) - Error)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const char* GetCurrentDateTime();
DESCRIPTION: This function returns the current Date/Time information
IN: Nothing
RETURN: const char* string with information of Date/Time
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int CalculateAge(const char* birth);
DESCRIPTION: This function calculate the AGE from a birth Date
IN: const char* string with Date
RETURN: int value with Age
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const char* ToUpperCase(const char* text);
DESCRIPTION: This function change the string to UpperCase characters
IN: const char* text
RETURN: const char* with converted to UpperCase string
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const char* GenerateUUID();
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int WordCount(const char* text);
DESCRIPTION: This function count words in a given text
IN: const char* string (text)
RETURN: int value (Num of Words)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void StartTimer();
DESCRIPTION: This function start a internal elapsed time meter
IN: nothing
RETURN: nothing
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
double StopTimer();
DESCRIPTION: Stop the elapsed time meter and return time elapsed in Milliseconds
IN: nothing
RETURN: double value (Milliseconds)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void MicroDelay(long MicroSecs);
DESCRIPTION: This function make a Delay pause in MicroSecs
IN: long Microseconds
RETURN: Nothing
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ScreenShot(char*BmpName)
DESCRIPTION: This function make a screen capture of the Desktop in BMP format
IN: char* string with bitmap filename (ended in .bmp)
RETURN: Nothing, just make the screenshot and write it in disk
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const char* PassHash(const char* passwd, int encoding);
DESCRIPTION: This function Encode a text string to a SHA encoded hashed password
IN: const char* passwd - int encoding (0) SHA224 - (1) SHA256 - (2) SHA384 - (3) SHA512
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const char* PT_Element(AnsiString Command);
DESCRIPTION: This function return information of the element of Periodic Table
IN: AnsiString Command (can be the numeric number of element, or name or element or formulation name)
RETURN: const char* with desired information
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
