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

[Feature Request] Add stol function #2639

Open
1 task done
YichengDWu opened this issue May 13, 2024 · 5 comments
Open
1 task done

[Feature Request] Add stol function #2639

YichengDWu opened this issue May 13, 2024 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers mojo-repo Tag all issues with this label mojo-stdlib Tag for issues related to standard library

Comments

@YichengDWu
Copy link
Contributor

YichengDWu commented May 13, 2024

Review Mojo's priorities

What is your request?

atol is in the std but not stol, a similar function to strtol in C.

What is your motivation for this change?

More functionalities to parser strings.

Any other details?

No response

@YichengDWu YichengDWu added enhancement New feature or request mojo-repo Tag all issues with this label labels May 13, 2024
@JoeLoser JoeLoser added good first issue Good for newcomers mojo-stdlib Tag for issues related to standard library labels May 17, 2024
@gxyd
Copy link

gxyd commented May 17, 2024

Can I maybe try to work on this issue?

@soraros
Copy link
Contributor

soraros commented May 17, 2024

@gxyd You can just go ahead!

@bgreni
Copy link
Contributor

bgreni commented May 19, 2024

Since atol in mojo already accepts an optional base argument why would we have need for a second function in this case?

@YichengDWu
Copy link
Contributor Author

YichengDWu commented May 20, 2024

atol recognizes "1234" and stol regonizes "1234asda".

@bgreni
Copy link
Contributor

bgreni commented May 20, 2024

Ah I see the distinction between the behaviours now thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers mojo-repo Tag all issues with this label mojo-stdlib Tag for issues related to standard library
Projects
None yet
Development

No branches or pull requests

5 participants