Skip to content

Conversation

@ppavankumar19
Copy link

Summary:

This Pull Request improves the existing capitalize() function by making it more robust and user-friendly.
The function now properly capitalises the first alphabetical character, handles Unicode letters, and preserves leading spaces — all while maintaining backward compatibility.

Changes Introduced:

Added logic to locate the first alphabetic character (not just index 0).

Added support for Unicode characters such as ñ, ö, ç, etc.

Preserved the original structure of the string, including leading spaces.

Improved and expanded doctest examples for better coverage.

I'd like for you to ensure safe handling of empty strings and strings without alphabetic characters.

@algorithms-keeper algorithms-keeper bot added the tests are failing Do not merge until tests pass label Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests are failing Do not merge until tests pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant