Skip to content

Commit

Permalink
Rollup merge of rust-lang#22253 - huonw:unstable-words, r=aturon
Browse files Browse the repository at this point in the history
It is not totally clear if we should just use whitespace, or if the full
unicode word-breaking algorithm is more correct. If there is demand we
can reconsider this decision (and consider the precise algorithm to use
in detail).

cc rust-lang#15628.
  • Loading branch information
steveklabnik committed Feb 14, 2015
2 parents 41c7c4b + 3d9528a commit ffb12b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libcollections/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,8 @@ pub trait StrExt: Index<RangeFull, Output = str> {
/// let v: Vec<&str> = some_words.words().collect();
/// assert_eq!(v, vec!["Mary", "had", "a", "little", "lamb"]);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[unstable(feature = "str_words",
reason = "the precise algorithm to use is unclear")]
fn words(&self) -> Words {
UnicodeStr::words(&self[])
}
Expand Down

0 comments on commit ffb12b7

Please sign in to comment.