The template variable definition without surrounding braces.
Callback delegate to resolve a variable name (parameter) to the variable value. (return value) May be called more than once per variable name. See VariableCallback. Values are percent encoded by this function and must not be encoded by the callback function.
Note that all values returned by this function MUST be formed prior to template expansion in order to comply with RFC 6570. Therefore to ensure compatibility a given variable name must always evaluate to the same value every time.
Validate entire string strictly according to RFC 6570. Does NOT perform unicode code-point validation. Performs character-by-character checks for exact grammar checks.
Byte index to offset malformed URI format exceptions.
the resolved variable value (properly URI encoded)
TemplateURIFormatException on attempted use of a reserved operator, invalid variable specifications or strict issues.
assert(expandTemplateURIVariable(`?since,all,participating`, delegate(string k) @safe => URIVariable.init) == ""); assert(expandTemplateURIVariable(`?since,all,participating`, null) == ""); assert(expandTemplateURIVariable(`?since,all,participating`, ["all": "1"]) == "?all=1"); assert(expandTemplateURIVariable(`?since,all,participating`, [ "all": URIVariable("1"), "participating": URIVariable("1") ]) == "?all=1&participating=1");
Expands a variable template part of a URI template as defined in RFC 6570.