@@ -813,6 +813,7 @@ impl str {
813813 /// assert!(!bananas.contains("apples"));
814814 /// ```
815815 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
816+ #[ inline]
816817 pub fn contains < ' a , P : Pattern < ' a > > ( & ' a self , pat : P ) -> bool {
817818 core_str:: StrExt :: contains ( self , pat)
818819 }
@@ -900,6 +901,7 @@ impl str {
900901 /// assert_eq!(s.find(x), None);
901902 /// ```
902903 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
904+ #[ inline]
903905 pub fn find < ' a , P : Pattern < ' a > > ( & ' a self , pat : P ) -> Option < usize > {
904906 core_str:: StrExt :: find ( self , pat)
905907 }
@@ -944,6 +946,7 @@ impl str {
944946 /// assert_eq!(s.rfind(x), None);
945947 /// ```
946948 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
949+ #[ inline]
947950 pub fn rfind < ' a , P : Pattern < ' a > > ( & ' a self , pat : P ) -> Option < usize >
948951 where P :: Searcher : ReverseSearcher < ' a >
949952 {
@@ -1057,6 +1060,7 @@ impl str {
10571060 ///
10581061 /// [`split_whitespace`]: #method.split_whitespace
10591062 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
1063+ #[ inline]
10601064 pub fn split < ' a , P : Pattern < ' a > > ( & ' a self , pat : P ) -> Split < ' a , P > {
10611065 core_str:: StrExt :: split ( self , pat)
10621066 }
@@ -1106,6 +1110,7 @@ impl str {
11061110 /// assert_eq!(v, ["ghi", "def", "abc"]);
11071111 /// ```
11081112 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
1113+ #[ inline]
11091114 pub fn rsplit < ' a , P : Pattern < ' a > > ( & ' a self , pat : P ) -> RSplit < ' a , P >
11101115 where P :: Searcher : ReverseSearcher < ' a >
11111116 {
@@ -1152,6 +1157,7 @@ impl str {
11521157 /// assert_eq!(v, ["A", "", "B", ""]);
11531158 /// ```
11541159 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
1160+ #[ inline]
11551161 pub fn split_terminator < ' a , P : Pattern < ' a > > ( & ' a self , pat : P ) -> SplitTerminator < ' a , P > {
11561162 core_str:: StrExt :: split_terminator ( self , pat)
11571163 }
@@ -1195,6 +1201,7 @@ impl str {
11951201 /// assert_eq!(v, ["", "B", "", "A"]);
11961202 /// ```
11971203 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
1204+ #[ inline]
11981205 pub fn rsplit_terminator < ' a , P : Pattern < ' a > > ( & ' a self , pat : P ) -> RSplitTerminator < ' a , P >
11991206 where P :: Searcher : ReverseSearcher < ' a >
12001207 {
@@ -1247,6 +1254,7 @@ impl str {
12471254 /// assert_eq!(v, ["abc", "defXghi"]);
12481255 /// ```
12491256 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
1257+ #[ inline]
12501258 pub fn splitn < ' a , P : Pattern < ' a > > ( & ' a self , n : usize , pat : P ) -> SplitN < ' a , P > {
12511259 core_str:: StrExt :: splitn ( self , n, pat)
12521260 }
@@ -1294,6 +1302,7 @@ impl str {
12941302 /// assert_eq!(v, ["ghi", "abc1def"]);
12951303 /// ```
12961304 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
1305+ #[ inline]
12971306 pub fn rsplitn < ' a , P : Pattern < ' a > > ( & ' a self , n : usize , pat : P ) -> RSplitN < ' a , P >
12981307 where P :: Searcher : ReverseSearcher < ' a >
12991308 {
@@ -1334,6 +1343,7 @@ impl str {
13341343 /// assert_eq!(v, ["1", "2", "3"]);
13351344 /// ```
13361345 #[ stable( feature = "str_matches" , since = "1.2.0" ) ]
1346+ #[ inline]
13371347 pub fn matches < ' a , P : Pattern < ' a > > ( & ' a self , pat : P ) -> Matches < ' a , P > {
13381348 core_str:: StrExt :: matches ( self , pat)
13391349 }
@@ -1370,6 +1380,7 @@ impl str {
13701380 /// assert_eq!(v, ["3", "2", "1"]);
13711381 /// ```
13721382 #[ stable( feature = "str_matches" , since = "1.2.0" ) ]
1383+ #[ inline]
13731384 pub fn rmatches < ' a , P : Pattern < ' a > > ( & ' a self , pat : P ) -> RMatches < ' a , P >
13741385 where P :: Searcher : ReverseSearcher < ' a >
13751386 {
@@ -1415,6 +1426,7 @@ impl str {
14151426 /// assert_eq!(v, [(0, "aba")]); // only the first `aba`
14161427 /// ```
14171428 #[ stable( feature = "str_match_indices" , since = "1.5.0" ) ]
1429+ #[ inline]
14181430 pub fn match_indices < ' a , P : Pattern < ' a > > ( & ' a self , pat : P ) -> MatchIndices < ' a , P > {
14191431 core_str:: StrExt :: match_indices ( self , pat)
14201432 }
@@ -1457,6 +1469,7 @@ impl str {
14571469 /// assert_eq!(v, [(2, "aba")]); // only the last `aba`
14581470 /// ```
14591471 #[ stable( feature = "str_match_indices" , since = "1.5.0" ) ]
1472+ #[ inline]
14601473 pub fn rmatch_indices < ' a , P : Pattern < ' a > > ( & ' a self , pat : P ) -> RMatchIndices < ' a , P >
14611474 where P :: Searcher : ReverseSearcher < ' a >
14621475 {
@@ -1737,6 +1750,7 @@ impl str {
17371750 /// assert_eq!(s, s.replace("cookie monster", "little lamb"));
17381751 /// ```
17391752 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
1753+ #[ inline]
17401754 pub fn replace < ' a , P : Pattern < ' a > > ( & ' a self , from : P , to : & str ) -> String {
17411755 let mut result = String :: new ( ) ;
17421756 let mut last_end = 0 ;
0 commit comments