-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Doc: Clears up trim_char doc #18460
Doc: Clears up trim_char doc #18460
Conversation
@@ -1535,7 +1535,7 @@ pub trait StrSlice<'a> { | |||
/// ``` | |||
fn ends_with(&self, needle: &str) -> bool; | |||
|
|||
/// Returns a string with characters that match `to_trim` removed. | |||
/// Returns a string with characters that match `to_trim` removed from the left and the right. |
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.
Maybe "beginning and the end" would be better?
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 made the comment 2 lines long :p
I'll update it if it's unclear :)
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.
Actually it's the terminilogy used in the other trim methods, so it seems more consistent
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.
@gamazeps OK, sounds good!
Historically, 'trim' implies the ends, but it's not bad to be more clear. Thank you! |
Closes #18451