Content-type: text/html; charset=UTF-8
Call it with optional flags, the options string as the first parameter and the options you want to manipulate as additional parameters. At least one additional parameter must be provided.
It can either add, remove or replace components.
To add or replace a component, pass key[=value] or +key[=value] as a parameter. The latter syntax is useful if key starts with a dash and would therefore be interpreted as a removal operation. If the options string does not include a key key, it will be appended to the end of the options string. If it already exists, either with no value or a different value, the component will be replaced with the provided value.
To fully remove a component, pass -key. To only remove it if it is set to a specific value, pass -key=value.
You can terminate program options parsing via a standard double-dash (--) pseudo-option. It is recommended to always do so if you pass removal transformation operations, even if no actual options are used to avoid misinterpreting such transformation options as options/flags to the program.
nx/nx,clipboard=both,foo:50
calling "x2goupdateoptionsstring 'nx/nx,clipboard=both,foo:50' '-clipboard'" shall return
nx/nx,foo:50
while calling "x2goupdateoptionsstring 'nx/nx,clipboard=both,foo:50' '-clipboard=server'" shall return
nx/nx,clipboard=both,foo:50
Calling "x2goupdateoptionsstring 'nx/nx,clipboard=both,foo:50' 'bar'" shall return
nx/nx,clipboard=both,foo,bar:50
and calling "x2goupdateoptionsstring 'nx/nx,clipboard=both,foo:50' '+-bar' 'foo=gulp' '-clipboard=client'" shall return
nx/nx,clipboard=both,foo=gulp,-bar:50