mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-13 08:13:21 +00:00
Unstabilise words
for now.
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 #15628.
This commit is contained in:
parent
39b463f153
commit
3d9528a8d8
@ -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[])
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user