pub fn strip_prefix(path: &str) -> String
Expand description
Strips URL scheme and authority components from a path string
§Arguments
path
- A string that may be a URL or plain path
§Returns
The path component of the URL, or the original string if it’s not a valid URL
§Examples
use iceberg_rust_spec::util::strip_prefix;
assert_eq!(strip_prefix("s3://bucket/path"), "/path");
assert_eq!(strip_prefix("/plain/path"), "/plain/path");