show multiple slashes starts_with Path example
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
This commit is contained in:
parent
e7e41a8465
commit
4b549fa043
@ -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"));
|
||||
|
Loading…
Reference in New Issue
Block a user