Skip to content

Ferrari78/C_Libs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Small C Libs

Summary

Two libraries are included in the repo:

StringLib

Param Link
countUpperCases char* string countUpperCases
countWords char* string countWords
mostLetter char* string mostLetter

countUpperCases

This function counts the uppercase letters.

Input: The function requires a string to work Output: The output is an integer

    char b[255] = "Hello World";
    printf("%c", countUpperCases(b));   // 2

countWords

This function counts the number of words in the input string.

Input: The function requires a string to work Output: The output is an integer

    char b[255] = "Nessie's are cute;
    printf("%c", countWords(b));    // 3

mostLetter

This function returns a struct containing information about the most common letter in the string.

Input: The function requires a string to work Output: The output is a struct mostLetter

//Output of the function
typedef struct {
    char letter;
    int size;
} Letter;
char b[255] = "Nessie's are cute";
printf("%c", mostLetter(b)->letter);  // e
printf("%d", mostLetter(b)->size);      // 4

LinkedList

TimeLib

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published