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: string utility library #159

Merged
merged 3 commits into from
Feb 13, 2025

Conversation

armaanansari121
Copy link
Contributor

@armaanansari121 armaanansari121 commented Feb 12, 2025

📝 Feat: String utility library

🛠️ Issue

📖 Description

Implemented the string library with the following components.

  • String struct which represents the String that we are working with.
  • new method to create an empty string.
  • len method to retrieve the length of the string.
  • concatenate method to safely concatenate two strings, This method takes a reference to the string to which another string is to be concatenated.
  • starts_with method to check if a string starts with a substring.
  • ends_with method to check if a string ends with a substring.

🖼️ Screenshots - Tests

image

📝 Additional Notes

  • Added integration tests for each function considering proper edge cases.
  • Added some real world use cases in the tests.
  • Added proper documentation for each function to improve code maintainability.

Copy link
Contributor

@coxmars coxmars left a comment

Choose a reason for hiding this comment

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

@armaanansari121 Great job, it looks pretty good to me. Also, can you create a .tool-versions please 🫡

@armaanansari121
Copy link
Contributor Author

@armaanansari121 Great job, it looks pretty good to me. Also, can you create a .tool-versions please 🫡

Sure give me a minute.

@armaanansari121
Copy link
Contributor Author

The changes have been made, ser.

@armaanansari121
Copy link
Contributor Author

@coxmars seems like the crowdfunding contract has some failing tests. Please let me know if I need to change anything.

Copy link
Contributor

@coxmars coxmars left a comment

Choose a reason for hiding this comment

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

LGTM!

@coxmars coxmars requested a review from danielcdz February 13, 2025 00:39
@armaanansari121
Copy link
Contributor Author

Done ser! @danielcdz

@danielcdz
Copy link
Member

@armaanansari121 looks pretty clean, thanks for your collaboration!

@danielcdz danielcdz merged commit 0219697 into KaizeNodeLabs:main Feb 13, 2025
1 of 2 checks passed
@armaanansari121
Copy link
Contributor Author

Thank you very much. Looking forward to more contributions :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT]: Create a basic string utility library
3 participants