Skip to content

Latest commit

 

History

History
64 lines (61 loc) · 3.82 KB

README.md

File metadata and controls

64 lines (61 loc) · 3.82 KB

CLib 📖 Build Status

My personal C library that replace some basic systems functions.
Please, if you're a students who want to make his own library due to a project school, don't copy my code. Do your OWN code.

Functions 👾

int my_compute_power_rec(int nb, int p);
int my_compute_square_root(int nb);
int my_find_prime_sup(int nb);
int my_getnbr(char const *str);
int my_is_prime(int nb);
int my_isneg(int n);
int my_put_nbr(int nb);
void my_putchar(char c);
int my_putstr(char const *str);
char *my_revstr(char *str);
int my_str_isalpha(char const *str);
int my_str_isnum(char const *str);
char *my_strcat(char *dest, char const *src);
char *my_strcpy(char *dest, char const *src);
int my_strlen(char const *str);
char *my_strncat(char *dest, char const *src, int nb);
char *my_strncpy(char *dest, char const *src, int n);
void my_swap(int *a, int *b);
int my_strcmp(char const *s1, char const *s2);
char **my_split(char const *str, char deli);

Development status 🚧

Functions Description Done
my_putchar Print one given char
my_isneg Check if the number given as parameter is negative
my_put_nbr Print a given number
my_swap Swap the content of two integers
my_putstr Print a given char*
my_strlen Return the size of a char*
my_getnbr Return a number, sent to the function as a string
my_sort_int_array Sort an integer array in ascending order
my_compute_power_rec Return the first argument raised to the power p
my_compute_square_root Return the square root (if it is a whole number) of the number
my_is_prime Return 1 if the number is prime and 0 if not
my_find_prime_sup Return the smallest prime number that is greater than, or equal to, the number given
my_strcpy Copy a string into another
my_strncpy Copy n characters from a string into another
my_revstr Reverse a string
my_strdup Duplicate a string
my_strstr
my_strcmp
my_strncmp
my_strupcase Put every letter of every word in it in uppercase
my_strlowcase Put every letter of every word in it in lowercase
my_strcapitalize Capitalize the first letter of each word
my_str_isalpha Return 1 if the string passed as parameter only contains alphabetical characters and 0 if the string contains another type of character
my_str_isnum Return 1 if the string passed as parameter only contains digits and 0 otherwise
my_str_islower Return 1 if the string passed as parameter only contains lowercase alphabetical characters and 0 otherwise
my_str_isupper Return 1 if the string passed as parameter only contains uppercase alphabetical characters and 0 otherwise
my_str_isprintable Return 1 if the string passed as parameter only contains printable characters and 0 otherwise
my_showstr Print a string and return 0
my_showmem Print a memory dump and return 0
my_strcat Concatenate two strings
my_strncat Concatenate n characters of the source string to the end of the destination string
my_split ⚠️
my_atoi  
my_itoa