Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added count_vovels in string. (saw it in the python version) #852

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Darelife
Copy link

@Darelife Darelife commented Jan 3, 2025

Description

Added a count_vovels algorithm to the string category. Uses a basic O(n) algorithms, (where n = number of characters in the string). Checks whether any of the characters in the string is 'a','e','i','o','u','A','E','I','O', or 'U'. It uses the filter() method to quickly check for it.

input.chars().filter(|c| "aeiouAEIOU".contains(*c)).count()

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

(However there seems to be a function in the cypher category that might be causing an error)

@Darelife Darelife requested review from imp2002 and vil02 as code owners January 3, 2025 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant