getBaseUri

external fun getBaseUri(uri: String, includeQuery: Boolean? = definedExternally): String(source)

Given a URI, returns the base path of the URI.

// basePath will be "/Gallery/";
const basePath = getBaseUri('/Gallery/simple.czml?value=true&example=false');

// basePath will be "/Gallery/?value=true&example=false";
const basePath = getBaseUri('/Gallery/simple.czml?value=true&example=false', true);

Return

The base path of the Uri.

Parameters

uri

The Uri.

includeQuery

Whether or not to include the query string and fragment form the uri Default value - false

See also