Skip to content

Commit

Permalink
Document an edge case of str::split_once
Browse files Browse the repository at this point in the history
  • Loading branch information
imbolc committed Jun 13, 2022
1 parent 083721a commit acda886
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/core/src/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1632,6 +1632,7 @@ impl str {
///
/// ```
/// assert_eq!("cfg".split_once('='), None);
/// assert_eq!("cfg=".split_once('='), Some(("cfg", "")));
/// assert_eq!("cfg=foo".split_once('='), Some(("cfg", "foo")));
/// assert_eq!("cfg=foo=bar".split_once('='), Some(("cfg", "foo=bar")));
/// ```
Expand Down

0 comments on commit acda886

Please sign in to comment.