show multiple slashes starts_with Path example

Co-authored-by: Joshua Nelson <joshua@yottadb.com>
This commit is contained in:
Ivan Tham 2020-08-10 00:43:45 +08:00 committed by GitHub
parent e7e41a8465
commit 4b549fa043
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2087,7 +2087,8 @@ impl Path {
/// assert!(path.starts_with("/etc"));
/// assert!(path.starts_with("/etc/"));
/// assert!(path.starts_with("/etc/passwd"));
/// assert!(path.starts_with("/etc/passwd/")); // extra slash(es) is okay
/// assert!(path.starts_with("/etc/passwd/")); // extra slash is okay
/// assert!(path.starts_with("/etc/passwd///")); // multiple extra slashes are okay
///
/// assert!(!path.starts_with("/e"));
/// assert!(!path.starts_with("/etc/passwd.txt"));