Skip to content

Conversation

tashifkhan
Copy link

the functions include

  • Upper Case conversion
  • checking palindrome
  • finding substring
  • replacing substring

Copy link

netlify bot commented Dec 30, 2024

Deploy Preview for quicksnip ready!

Name Link
🔨 Latest commit b14cd55
🔍 Latest deploy log https://app.netlify.com/sites/quicksnip/deploys/677296c379f1ff0008a0ff80
😎 Deploy Preview https://deploy-preview-26--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.

"#include <string>",
"#include <algorithm>",
"",
"std::string toUpperCase(const std::string& input) {",
Copy link
Collaborator

@Mathys-Gasnier Mathys-Gasnier Dec 30, 2024

Choose a reason for hiding this comment

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

Why are you taking the string by reference ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think a constant reference is a good thing. It will not copy the whole variable, but just create a reference. But in this case yes, instead of making a const reference here and then creating another copy to return the string. They can just pass by value and return that string after transforming.

"author": "tashifkhan"
},
{
"title": "Find Substring",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this snippet really require, when its just a single function in the STL?

@technoph1le technoph1le added the update needed Code needs to be updated. label Dec 30, 2024
@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

@Mathys-Gasnier
Copy link
Collaborator

Hey, changes were requested on your PR, but we got no news for more than a week, Closing this as stale.

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.

4 participants