Skip to content

Strings methods: startswith()#1049

Merged
czgdp1807 merged 4 commits into
lcompilers:mainfrom
AbdelrahmanKhaledd:str@startswith
Aug 31, 2022
Merged

Strings methods: startswith()#1049
czgdp1807 merged 4 commits into
lcompilers:mainfrom
AbdelrahmanKhaledd:str@startswith

Conversation

@AbdelrahmanKhaledd

Copy link
Copy Markdown
Collaborator

No description provided.

@AbdelrahmanKhaledd

Copy link
Copy Markdown
Collaborator Author

@certik @czgdp1807
Ready for review

s = " empty"
assert s.startswith(" ") == True
assert " @" .startswith(" ") == True
assert " emptyAaaaAABBbbbbBB" .startswith(s) == True

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try giving something in the middle portion of the string such as AABB in startswith and see if it returns False. Also give something like emptyAaaX as input to startswith.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i added them and edit those corner cases in functions, i think it's ready now.

@czgdp1807 czgdp1807 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @certik Should we merge this?

@czgdp1807

Copy link
Copy Markdown
Collaborator

Ah! Resolve the conflicts @Abdelrahman-Kh-Fouad.

@AbdelrahmanKhaledd

Copy link
Copy Markdown
Collaborator Author

@czgdp1807 Done!

@czgdp1807 czgdp1807 merged commit d12b104 into lcompilers:main Aug 31, 2022
@AbdelrahmanKhaledd AbdelrahmanKhaledd deleted the str@startswith branch August 31, 2022 08:27
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.

2 participants