-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Minor: refactor trim
to clean up duplicated code
#8434
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.
This is very nice @Weijun-H -- thank you 🙏
} | ||
} | ||
|
||
/// Removes the longest string containing only characters in characters (a space by default) from the start and end of string. | ||
/// btrim('xyxtrimyyx', 'xyz') = 'trim' |
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.
It might help to explain what characters
is here -- specifically args[1]
if present
47e7cfb
to
ec7d7ac
Compare
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.
Thanks again @Weijun-H
* refactor trim * add fmt for TrimType * fix closure * update comment
Which issue does this PR close?
Closes #.
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?