@@ -1324,11 +1324,11 @@ pub trait ByteSlice: Sealed {
1324
1324
SplitReverse :: new ( self . as_bytes ( ) , splitter. as_ref ( ) )
1325
1325
}
1326
1326
1327
- /// Split this byte string at the first occurance of `splitter`.
1327
+ /// Split this byte string at the first occurrence of `splitter`.
1328
1328
///
1329
1329
/// If the `splitter` is found in the byte string, returns a tuple
1330
- /// containing the parts of the string before and after the first occurance
1331
- /// of `splitter` respectively. Otherwise, if there are no occurances of
1330
+ /// containing the parts of the string before and after the first occurrence
1331
+ /// of `splitter` respectively. Otherwise, if there are no occurrences of
1332
1332
/// `splitter` in the byte string, returns `None`.
1333
1333
///
1334
1334
/// The splitter may be any type that can be cheaply converted into a
@@ -1368,11 +1368,11 @@ pub trait ByteSlice: Sealed {
1368
1368
Some ( ( & bytes[ ..start] , & bytes[ end..] ) )
1369
1369
}
1370
1370
1371
- /// Split this byte string at the last occurance of `splitter`.
1371
+ /// Split this byte string at the last occurrence of `splitter`.
1372
1372
///
1373
1373
/// If the `splitter` is found in the byte string, returns a tuple
1374
- /// containing the parts of the string before and after the last occurance
1375
- /// of `splitter`, respectively. Otherwise, if there are no occurances of
1374
+ /// containing the parts of the string before and after the last occurrence
1375
+ /// of `splitter`, respectively. Otherwise, if there are no occurrences of
1376
1376
/// `splitter` in the byte string, returns `None`.
1377
1377
///
1378
1378
/// The splitter may be any type that can be cheaply converted into a
@@ -1915,7 +1915,7 @@ pub trait ByteSlice: Sealed {
1915
1915
/// assert_eq!(vec![(0, 5, "à̖"), (5, 13, "🇺🇸")], graphemes);
1916
1916
/// ```
1917
1917
///
1918
- /// This example shows what happens when invalid UTF-8 is enountered . Note
1918
+ /// This example shows what happens when invalid UTF-8 is encountered . Note
1919
1919
/// that the offsets are valid indices into the original string, and do
1920
1920
/// not necessarily correspond to the length of the `&str` returned!
1921
1921
///
0 commit comments