Skip to content

rowanvictor01/string-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

string-analyzer

A C++ program that analyzes strings and checks for palindromes.


πŸš€ Features

  • Counts:
    • Total characters (including spaces)
    • Letters
    • Vowels
    • Digits
    • Special characters
  • Checks whether the input is a palindrome (ignores case and non-alphanumeric characters)
  • Handles input of full sentences (using getline)

πŸ“Œ Sample Output

Hi, Please enter a phrase or sentence: A man, a plan, a canal, Panama

Analysis: Total Characters (including spaces): 34 Letters: 21 Digits: 0 Vowels: 10 Special: 13 Palindrome: Yes


πŸ“š Learning Note / Roadmap At the time this code was written, I had not yet learned about the concepts of passing by reference and passing by value in C++. As a result, this version uses global variables for tracking counts (letters, digits, vowels, symbols).

Now that I understand how to pass arguments by reference, a future version of this program will refactor the check() function to eliminate the use of global variables. This will make the code more modular and maintainable.

This repository is meant to reflect my learning journey, and the improvements over time will show how my understanding of C++ evolves.

Releases

No releases published

Packages

No packages published