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

fix: string.Trim only trim ' ' #1194

Merged
merged 6 commits into from
Oct 4, 2024
Merged

Conversation

nan01ab
Copy link
Contributor

@nan01ab nan01ab commented Oct 3, 2024

fix of #1186

string.Trim uses same semantics with char.IsWhiteSpace to determine an ASCII char that is whitespace or not.

@nan01ab
Copy link
Contributor Author

nan01ab commented Oct 3, 2024

@Jim8y

@Jim8y
Copy link
Contributor

Jim8y commented Oct 3, 2024

need unit.test as well

Copy link
Member

@shargon shargon left a comment

Choose a reason for hiding this comment

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

UT required

Copy link
Member

@vncoelho vncoelho left a comment

Choose a reason for hiding this comment

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

I believe the change is correct following the logic here, but in fact a UT is necessary

@nan01ab
Copy link
Contributor Author

nan01ab commented Oct 4, 2024

UT will be added later.

@Jim8y
Copy link
Contributor

Jim8y commented Oct 4, 2024

UT will be added later.

Wait, i am working on fixing the method itself, your UT will not work before that.

@Jim8y
Copy link
Contributor

Jim8y commented Oct 4, 2024

@shargon @vncoelho @nan01ab please check the latest update and unit test.

Copy link
Member

@shargon shargon left a comment

Choose a reason for hiding this comment

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

I don't like inline methods here, but if it works for you @Jim8y, I'm not against to

@Jim8y
Copy link
Contributor

Jim8y commented Oct 4, 2024

I don't like inline methods here, but it works for you @Jim8y, I'm not against to

@shargon Thank you for your support. I know what you mean clearly, and i actually also don't like it, but doing it this way makes it eaiser to implement the method and easier to review the code.

Implement these methods purely in opcode is very hard to maintain and review (easy to be wrong, and hard to find them). I am thinking that maybe when we have multiple these unly implementations, we can group them and make these methods into something like suger syntax.

We can figure out a better way later.

@Jim8y Jim8y merged commit be47dc1 into neo-project:master Oct 4, 2024
4 checks passed
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