Add TitleCase Implementation#7473
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7473 +/- ##
============================================
+ Coverage 79.86% 79.87% +0.01%
- Complexity 7328 7337 +9
============================================
Files 807 808 +1
Lines 23817 23834 +17
Branches 4687 4691 +4
============================================
+ Hits 19021 19038 +17
- Misses 4035 4036 +1
+ Partials 761 760 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Hey folks, just checking in on this PR — it's been a few days. Happy to make any changes if something needs to be adjusted. Let me know! |
There was a problem hiding this comment.
Pull request overview
This PR introduces a new string utility for converting input text into title case within com.thealgorithms.strings, along with a JUnit test suite to validate the behavior.
Changes:
- Added
TitleCase.toTitleCase(String)utility to capitalize the first letter of each word and lowercase the remaining letters. - Added
TitleCaseTestcovering null/empty input, single/multiple words, and whitespace preservation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/main/java/com/thealgorithms/strings/TitleCase.java | Adds the TitleCase utility implementation for title-casing strings. |
| src/test/java/com/thealgorithms/strings/TitleCaseTest.java | Adds unit tests validating TitleCase.toTitleCase behavior across common input shapes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
addb081 to
1d1204c
Compare
1d1204c to
69e8eee
Compare
clang-format -i --style=file path/to/your/file.java