File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1449,6 +1449,8 @@ impl Path {
1449
1449
1450
1450
/// Determines whether `base` is a prefix of `self`.
1451
1451
///
1452
+ /// Only considers whole path components to match.
1453
+ ///
1452
1454
/// # Examples
1453
1455
///
1454
1456
/// ```
@@ -1457,6 +1459,8 @@ impl Path {
1457
1459
/// let path = Path::new("/etc/passwd");
1458
1460
///
1459
1461
/// assert!(path.starts_with("/etc"));
1462
+ ///
1463
+ /// assert!(!path.starts_with("/e"));
1460
1464
/// ```
1461
1465
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1462
1466
pub fn starts_with < P : AsRef < Path > > ( & self , base : P ) -> bool {
@@ -1465,6 +1469,8 @@ impl Path {
1465
1469
1466
1470
/// Determines whether `child` is a suffix of `self`.
1467
1471
///
1472
+ /// Only considers whole path components to match.
1473
+ ///
1468
1474
/// # Examples
1469
1475
///
1470
1476
/// ```
You can’t perform that action at this time.
0 commit comments