-
Notifications
You must be signed in to change notification settings - Fork 171
capitalize and upper functions (String module) #669
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
Draft
Madhav2310
wants to merge
20
commits into
lcompilers:main
Choose a base branch
from
Madhav2310:madhav6
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
90d928e
capitalize and upper functions (String module)
Madhav2310 e07b0a0
fixing
Madhav2310 299c8e2
Revert "fixing"
Madhav2310 644fc68
lower added
Madhav2310 7726839
capitalize, upper, lower method functions added to builtin.py and int…
Madhav2310 e80ba53
expt
Madhav2310 22de62b
python functions code
Madhav2310 3c8fa4a
Add compile time upper, lower and capitalize in python_comptime_eval.h
Madhav2310 f980599
Merge branch 'main' into madhav6
Madhav2310 762a738
fixing
Madhav2310 b537566
Merge branch 'madhav6' of https://github.com/Madhav2310/lpython into …
Madhav2310 42b7068
Update python_comptime_eval.h
Madhav2310 560742a
Update integration_tests/test_builtin_upper.py
Madhav2310 33e9e78
Update integration_tests/test_builtin_lower.py
Madhav2310 17838a0
suggested changes implemented
Madhav2310 6bcf65e
Merge branch 'madhav6' of https://github.com/Madhav2310/lpython into …
Madhav2310 f3ffcf3
suggested changes implemented
Madhav2310 eece0e5
fixing
Madhav2310 48c5502
fixing
Madhav2310 bdda9be
fixing 2.0
Madhav2310 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from lpython_builtin import (capitalize) | ||
from ltypes import i32, f64, f32, i64, c32, c64 | ||
|
||
def test_capitalize(): | ||
i: str | ||
i = capitalize("lpyThon") | ||
assert i == "Lpython" | ||
i: str | ||
i = capitalize("deVeLoPmEnT") | ||
assert i == "Development" | ||
|
||
test_capitalize() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from lpython_builtin import (lower) | ||
from ltypes import i32, f64, f32, i64, c32, c64 | ||
|
||
def test_lower(): | ||
i: str | ||
i = lower("CoMpIlEr") | ||
assert i == "compiler" | ||
|
||
test_lower() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from lpython_builtin import (upper) | ||
from ltypes import i32, f64, f32, i64, c32, c64 | ||
|
||
def test_upper(): | ||
i: str | ||
i = upper("lpython") | ||
assert i == "LPYTHON" | ||
|
||
test_upper() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s: str
s = "lpyThon"
capitalize(s)