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

[Term Entry] Dart Type Conversion .tryParse() #4572 #4586

Merged
merged 15 commits into from May 1, 2024

Conversation

lou-pastorino
Copy link
Contributor

@lou-pastorino lou-pastorino commented Apr 29, 2024

Description

  • Added the tryParse() term for Dart.
  • Mardown file entry is under: docs/tree/term-tryParse/content/dart/concepts/type-conversion

Issue Solved

Type of Change

  • Adding a new entry

Checklist

  • [x ] All writings are my own.
  • [ x] My entry follows the Codecademy Docs style guide.
  • [x ] My changes generate no new warnings.
  • [ x] I have performed a self-review of my own writing and code.
  • [ x] I have checked my entry and corrected any misspellings.
  • [ x] I have made corresponding changes to the documentation if needed.
  • [ x] I have confirmed my changes are not being pushed from my forked main branch.
  • [ x] I have confirmed that I'm pushing from a new branch named after the changes I'm making.
  • [ x] I have linked any issues that are relevant to this PR in the Issues Solved section.

@CLAassistant
Copy link

CLAassistant commented Apr 29, 2024

CLA assistant check
All committers have signed the CLA.

@mamtawardhani mamtawardhani self-assigned this Apr 29, 2024
@mamtawardhani mamtawardhani added new entry New entry or entries status: under review Issue or PR is currently being reviewed dart Dart entries labels Apr 29, 2024
@mamtawardhani
Copy link
Collaborator

Hey @lou-pastorino! Please update the path to docs/content/dart/concepts/type-conversion/terms/tryParse/tryParse.md

Copy link
Collaborator

@mamtawardhani mamtawardhani left a comment

Choose a reason for hiding this comment

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

Hey @lou-pastorino!
Thanks for contributing to the Codecademy docs!

I've suggested a few changes, please review and modify them at your earliest convenience.
Thank you!

Comment on lines 27 to 51
## Example

1. value = num.tryParse('5'); // 5
2. value = num.tryParse('five'); // null


## Codebyte Example (if applicable)

```dart
void main() {
String input = '42';
int? parsedInt = int.tryParse(input);

if (parsedInt != null) {
print('Parsed integer: $parsedInt');
} else {
print('Failed to parse the string as an integer');
}
}
```
The above code will return the following output:

```dart
//Parsed integer: 42
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

The ## Codebyte is not needed, please place this codebyte under ## Example along with its output. Remove the:
value = num.tryParse('5'); // 5
2. value = num.tryParse('five'); // null

and ## Codebyte example tag

lou-pastorino and others added 9 commits April 30, 2024 11:01
Co-authored-by: mamtawardhani <53176352+mamtawardhani@users.noreply.github.com>
Co-authored-by: mamtawardhani <53176352+mamtawardhani@users.noreply.github.com>
Co-authored-by: mamtawardhani <53176352+mamtawardhani@users.noreply.github.com>
Co-authored-by: mamtawardhani <53176352+mamtawardhani@users.noreply.github.com>
Co-authored-by: mamtawardhani <53176352+mamtawardhani@users.noreply.github.com>
Co-authored-by: mamtawardhani <53176352+mamtawardhani@users.noreply.github.com>
Co-authored-by: mamtawardhani <53176352+mamtawardhani@users.noreply.github.com>
@lou-pastorino
Copy link
Contributor Author

@mamtawardhani hello! Thank you for your feedback.

Pending your review, I believe I the suggested changes were made successfully.

Copy link
Collaborator

@mamtawardhani mamtawardhani left a comment

Choose a reason for hiding this comment

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

Hey @lou-pastorino!

Can you please implement the one suggestion given? Thanks!

Co-authored-by: mamtawardhani <53176352+mamtawardhani@users.noreply.github.com>
@lou-pastorino
Copy link
Contributor Author

@mamtawardhani Hey! The final suggestion has been implemented.
Thanks

@mamtawardhani
Copy link
Collaborator

Hey @lou-pastorino! Thank you for implementing the suggestions!

Lastly, could you please update the path to docs/content/dart/concepts/type-conversion/terms/tryParse/tryParse.md

@lou-pastorino
Copy link
Contributor Author

Hey @lou-pastorino! Thank you for implementing the suggestions!

Lastly, could you please update the path to docs/content/dart/concepts/type-conversion/terms/tryParse/tryParse.md

Hi @mamtawardhani

Apologies, I must be getting confused somewhere. On my side it looks like the file path is as you have described above. Do I need to create a new pull request to merge the updated branch with my main branch to update the file path?
Apologies for the confusion!

Copy link
Collaborator

@mamtawardhani mamtawardhani left a comment

Choose a reason for hiding this comment

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

Good to go for the second review.

@lou-pastorino Thanks for making the changes!

@Sriparno08 Sriparno08 self-assigned this May 1, 2024
@Sriparno08 Sriparno08 added status: under review Issue or PR is currently being reviewed and removed status: ready for next review labels May 1, 2024
Copy link
Collaborator

@Sriparno08 Sriparno08 left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@Sriparno08 Sriparno08 merged commit 26ca81e into Codecademy:main May 1, 2024
6 checks passed
Copy link

github-actions bot commented May 1, 2024

👋 @lou-pastorino
You have contributed to Codecademy Docs, and we would like to know more about you and your experience.
Please take a minute to fill out this four question survey to help us better understand Docs contributions and how we can improve the experience for you and our learners.
Thank you for your help!

🎉 Your contribution(s) can be seen here:

https://www.codecademy.com/resources/docs/dart/type-conversion/tryParse

Please note it may take a little while for changes to become visible.
If you're appearing as anonymous and want to be credited, see here.

@Sriparno08 Sriparno08 added status: review 2️⃣ completed and removed status: under review Issue or PR is currently being reviewed labels May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Term Entry] Dart Type Conversion .tryParse()
4 participants