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

[stdlib] pythonic isupper & islower #3095

Closed

Conversation

dimitrilw
Copy link

added:

  • isupper(String)
  • islower(String)
  • String.isupper()
  • String.islower()

also:

  • added tests for each of the above

All string-related tests pass, including added tests.

image

add functions/methods:
- isupper(String)
- islower(String)
- String.isupper()
- String.islower()

also:
- add tests for each of the above
- tests pass

Signed-off-by: Dimitri <5898931+dimitrilw@users.noreply.github.com>
@dimitrilw
Copy link
Author

After merged, this issue can be closed: #2975

@dimitrilw dimitrilw changed the title pythonic isupper & islower [stdlib] pythonic isupper & islower Jun 22, 2024
@dimitrilw
Copy link
Author

Updated PR title.

@dimitrilw
Copy link
Author

For ref, python 3 str.islower() and str.isupper():
image

@dimitrilw
Copy link
Author

This PR establishes String.islower() and String.isupper() in Mojo, to match Python string methods.

@dimitrilw
Copy link
Author

Please do NOT merge yet. I need to update to ensure 100% Pythonic behavior match & hit edge cases.

@dimitrilw dimitrilw closed this Jun 25, 2024
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.

None yet

1 participant