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

✨ feat: add strings reverse and strings contain func in utils.strings file #2603

Closed
wants to merge 1 commit into from

Conversation

ShyunnY
Copy link

@ShyunnY ShyunnY commented Aug 26, 2023

Description

This pr adds two commonly used string functions. I believe that in many cases string reversal and the function of determining whether the string is in the specified slice will be used. Therefore, I write this pr.

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • For new functionalities I follow the inspiration of the express js framework and built them similar in usage
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • If new dependencies exist, I have checked that they are really necessary and agreed with the maintainers/community (we want to have as few dependencies as possible)
  • I tried to make my code as fast as possible with as few allocations as possible

Commit formatting:

Use emojis on commit messages so it provides an easy way of identifying the purpose or intention of a commit. Check out the emoji cheatsheet here: https://gitmoji.carloscuesta.me/

@welcome
Copy link

welcome bot commented Aug 26, 2023

Thanks for opening this pull request! 🎉 Please check out our contributing guidelines. If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

@ReneWerner87
Copy link
Member

please also add the internal usage, otherwise we would have to move the whole thing to the utils package
https://github.com/gofiber/utils

@ShyunnY
Copy link
Author

ShyunnY commented Aug 26, 2023

please also add the internal usage, otherwise we would have to move the whole thing to the utils package https://github.com/gofiber/utils

There may be codes similar to these two functions inside the fiber, but I haven't found it yet. But when writing logic/service. These two functions are used more often.Maybe you can move there gofiber/utils. @ReneWerner87

@gaby
Copy link
Member

gaby commented Aug 26, 2023

I feel like this should go in gofiber/utils/v2

@ShyunnY
Copy link
Author

ShyunnY commented Aug 26, 2023

I feel like this should go in gofiber/utils/v2

I do not understand. I can only see gofiber/utils. gofiber/utils/v2 was not found. So should my current PR be resubmitted into gofiber/utils?

@gaby
Copy link
Member

gaby commented Aug 26, 2023

I feel like this should go in gofiber/utils/v2

I do not understand. I can only see gofiber/utils. gofiber/utils/v2 was not found. So should my current PR be resubmitted into gofiber/utils?

It's the v2 branch under https://github.com/gofiber/utils

@leonklingele
Copy link
Member

leonklingele commented Aug 26, 2023 via email

@gaby
Copy link
Member

gaby commented Aug 29, 2023

@ReneWerner87 Do we move this to utils repo, or close it?

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.

4 participants