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] Fix startswith() and endswith() #3922

Open
wants to merge 4 commits into
base: nightly
Choose a base branch
from

Conversation

martinvuyk
Copy link
Contributor

@martinvuyk martinvuyk commented Jan 2, 2025

Fix startswith() and endswith()

Closes #3903
Solves the current CI failure with check_licences.mojo passing a StringSlice to String.startswith()

@martinvuyk martinvuyk requested a review from a team as a code owner January 2, 2025 14:32
@martinvuyk martinvuyk changed the title [stdlib] [NFC] Simplify startswith() and endswith() [stdlib] Fix startswith() and endswith() Jan 8, 2025
@martinvuyk
Copy link
Contributor Author

@JoeLoser @ConnorGray @jackos @lsh pinging all of you to see if anyone can expedite this so that the public CI doesn't keep failing

@ConnorGray
Copy link
Collaborator

!sync

@modularbot modularbot added the imported-internally Signals that a given pull request has been imported internally. label Jan 8, 2025
@modularbot
Copy link
Collaborator

✅🟣 This contribution has been merged 🟣✅

Your pull request has been merged to the internal upstream Mojo sources. It will be reflected here in the Mojo repository on the nightly branch during the next Mojo nightly release, typically within the next 24-48 hours.

We use Copybara to merge external contributions, click here to learn more.

@modularbot modularbot added the merged-internally Indicates that this pull request has been merged internally label Jan 8, 2025
modularbot pushed a commit that referenced this pull request Jan 11, 2025
Improve `startswith()` and `endswith()`

This changes these methods to take `StringSlice`, and simplifies their implementation
on `String` and `StringLiteral` to simply delegate to `StringSlice`'s implementation
of the same operation.

Closes  #3903.

Solves the current CI failure with `check_licences.mojo` passing a
`StringSlice` to `String.startswith()`.

Co-authored-by: Connor Gray <[email protected]>
Closes #3922
MODULAR_ORIG_COMMIT_REV_ID: 8b078da9d23edc4e118dc9854763e0fb69887fba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imported-internally Signals that a given pull request has been imported internally. merged-internally Indicates that this pull request has been merged internally
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants