Skip to content

Add cpp basics #83

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

Closed
wants to merge 2 commits into from
Closed

Conversation

ohhpeejoshi
Copy link

@ohhpeejoshi ohhpeejoshi commented Jan 1, 2025

Description

Added a new C++ snippet under the String Manipulation category, which checks if a given string is a palindrome.

Type of Change

  • ✨ New snippet
  • πŸ›  Improvement to an existing snippet
  • 🐞 Bug fix
  • πŸ“– Documentation update
  • πŸ”§ Other (please describe):

Checklist

  • I have tested my code and verified it works as expected.
  • My code follows the style and contribution guidelines of this project.
  • Comments are added where necessary for clarity.
  • Documentation has been updated (if applicable).
  • There are no new warnings or errors from my changes.

Related Issues

Closes #

Additional Context

Screenshots (Optional)

Click to view screenshots

Copy link

netlify bot commented Jan 1, 2025

βœ… Deploy Preview for quicksnip ready!

Name Link
πŸ”¨ Latest commit 4745f7c
πŸ” Latest deploy log https://app.netlify.com/sites/quicksnip/deploys/67750d69aa0cb90008722bf6
😎 Deploy Preview https://deploy-preview-83--quicksnip.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@Mathys-Gasnier Mathys-Gasnier left a comment

Choose a reason for hiding this comment

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

Hey, thanks for the contribution, please take a quick look at the comment I left, we can then move on with your snippet.

@@ -39,7 +39,7 @@
},
{
"title": "Split String",
"description": "Splits a string by a delimiter",
"description": "Splits a string by a delimiter.",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you please remove the . you added here

"code": [
"#include <string>",
"",
"// Function to check if a given string is a palindrome",
Copy link
Collaborator

@saminjay saminjay Jan 1, 2025

Choose a reason for hiding this comment

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

Comments are generally not required in the snippet.
Except for the one in line 73, I don't think others are required.
Even that one is too obvious, but I think is fine, people sometimes don't realize that could be an option.

@technoph1le technoph1le added the update needed Code needs to be updated. label Jan 1, 2025
@majvax
Copy link
Collaborator

majvax commented Jan 1, 2025

to be consistent with the palindrome snippet of other languages, you should check a lowercased version of the string.

@Mathys-Gasnier
Copy link
Collaborator

Hey, we recently updated how snippets are stored, please update your PR to match the changes, you will be able to see how to add snippets in CONTRIBUTING.md.
For ref: #87

@majvax majvax mentioned this pull request Jan 1, 2025
10 tasks
@saminjay
Copy link
Collaborator

saminjay commented Jan 9, 2025

Closing this as stale.
If you want to contribute, please create a new PR following our guidelines.
Thanks

@saminjay saminjay closed this Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Snippets update needed Code needs to be updated.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants