Skip to main content

parse_land_uri

Function parse_land_uri 

Source
fn parse_land_uri(uri: &str) -> Result<(String, String), String>
Expand description

Parse a land:// URI to extract domain and path

§Parameters

  • uri: The land:// URI (e.g., “land://code.editor.land/path/to/resource”)

§Returns

A tuple of (domain, path) where:

  • domain: “code.editor.land”
  • path: “/path/to/resource”

§Example

let (domain, path) = parse_land_uri("land://code.editor.land/api/status");
assert_eq!(domain, "code.editor.land");
assert_eq!(path, "/api/status");