Skip to content
/ rustc Public
forked from rust-lang/rust

Commit 28c690e

Browse files
authored
Rollup merge of rust-lang#72466 - lzutao:stabilize_str-strip, r=dtolnay
Stabilize str_strip feature This PR stabilizes these APIs: ```rust impl str { /// Returns a string slice with the prefix removed. /// /// If the string starts with the pattern `prefix`, `Some` is returned with the substring where /// the prefix is removed. Unlike `trim_start_matches`, this method removes the prefix exactly /// once. pub fn strip_prefix<'a, P: Pattern<'a>>(&'a self, prefix: P) -> Option<&'a str>; /// Returns a string slice with the suffix removed. /// /// If the string ends with the pattern `suffix`, `Some` is returned with the substring where /// the suffix is removed. Unlike `trim_end_matches`, this method removes the suffix exactly /// once. pub fn strip_suffix<'a, P>(&'a self, suffix: P) -> Option<&'a str> where P: Pattern<'a>, <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>; } ``` Closes rust-lang#67302
2 parents e820a03 + 221c482 commit 28c690e

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/driver.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
22
#![feature(rustc_private)]
3-
#![feature(str_strip)]
43

54
// FIXME: switch to something more ergonomic here, once available.
65
// (Currently there is no way to opt into sysroot crates without `extern crate`.)

0 commit comments

Comments
 (0)