Main Content

string

Class: matlab.net.QueryParameter
Namespace: matlab.net

Encoded query parameter as string

Syntax

str = string(obj)

Description

str = string(obj) returns a QueryParameter object as an encoded string.

Input Arguments

expand all

Query parameter, specified as one or more matlab.net.QueryParameter objects. If obj is a vector of QueryParameter objects, then the method returns a single string joining the encoded members with & character. If obj is empty, then the method returns "".

Output Arguments

expand all

Query parameter, returned as a string.

str is of the form name=value, where name is the Name property and value is the Value property, represented as a string. If Value is a cell array or nonscalar other than a character vector, it is converted based on the Format property. The conversion might result in multiple name=value pairs separated by the & character and including other punctuation. Special characters in Name or Value that are not permitted in a query are percent-encoded (%), except for space, which is encoded as +. For more information on encoding, see the qStr argument to the QueryParameter constructor.

Version History

Introduced in R2016b