@@ -1053,10 +1053,10 @@ impl str {
1053
1053
}
1054
1054
1055
1055
/// An iterator over substrings of the given string slice, separated by a
1056
- /// pattern, restricted to returning at most `count ` items.
1056
+ /// pattern, restricted to returning at most `n ` items.
1057
1057
///
1058
- /// The last element returned, if any, will contain the remainder of the
1059
- /// string slice .
1058
+ /// If `n` substrings are returned, the last substring ( the `n`th substring)
1059
+ /// will contain the remainder of the string .
1060
1060
///
1061
1061
/// The pattern can be a `&str`, [`char`], or a closure that determines the
1062
1062
/// split.
@@ -1098,16 +1098,16 @@ impl str {
1098
1098
/// assert_eq!(v, ["abc", "defXghi"]);
1099
1099
/// ```
1100
1100
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1101
- pub fn splitn < ' a , P : Pattern < ' a > > ( & ' a self , count : usize , pat : P ) -> SplitN < ' a , P > {
1102
- core_str:: StrExt :: splitn ( self , count , pat)
1101
+ pub fn splitn < ' a , P : Pattern < ' a > > ( & ' a self , n : usize , pat : P ) -> SplitN < ' a , P > {
1102
+ core_str:: StrExt :: splitn ( self , n , pat)
1103
1103
}
1104
1104
1105
1105
/// An iterator over substrings of this string slice, separated by a
1106
1106
/// pattern, starting from the end of the string, restricted to returning
1107
- /// at most `count ` items.
1107
+ /// at most `n ` items.
1108
1108
///
1109
- /// The last element returned, if any, will contain the remainder of the
1110
- /// string slice .
1109
+ /// If `n` substrings are returned, the last substring ( the `n`th substring)
1110
+ /// will contain the remainder of the string .
1111
1111
///
1112
1112
/// The pattern can be a `&str`, [`char`], or a closure that
1113
1113
/// determines the split.
@@ -1145,10 +1145,10 @@ impl str {
1145
1145
/// assert_eq!(v, ["ghi", "abc1def"]);
1146
1146
/// ```
1147
1147
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1148
- pub fn rsplitn < ' a , P : Pattern < ' a > > ( & ' a self , count : usize , pat : P ) -> RSplitN < ' a , P >
1148
+ pub fn rsplitn < ' a , P : Pattern < ' a > > ( & ' a self , n : usize , pat : P ) -> RSplitN < ' a , P >
1149
1149
where P :: Searcher : ReverseSearcher < ' a >
1150
1150
{
1151
- core_str:: StrExt :: rsplitn ( self , count , pat)
1151
+ core_str:: StrExt :: rsplitn ( self , n , pat)
1152
1152
}
1153
1153
1154
1154
/// An iterator over the matches of a pattern within the given string
0 commit comments