-
Notifications
You must be signed in to change notification settings - Fork 62
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
Feat: string utility library #159
Conversation
There was a problem hiding this 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 🫡
Sure give me a minute. |
The changes have been made, ser. |
@coxmars seems like the crowdfunding contract has some failing tests. Please let me know if I need to change anything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
examples/cairo/scripts/string_utility/tests/test_contract.cairo
Outdated
Show resolved
Hide resolved
Done ser! @danielcdz |
@armaanansari121 looks pretty clean, thanks for your collaboration! |
Thank you very much. Looking forward to more contributions :) |
📝 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
📝 Additional Notes