add_from_string


Description:

public void add_from_string (string string, bool cleanup)

string must be a semi-colon separated list of "<key>=<value>" strings (for example "DB_NAME=notes;USERNAME=alfred").

Each key and value must respect the RFC 1738 recommendations: the <constant>&lt;&gt;&quot;#%{}|\^~[]&apos;`;/?:@=& amp;</constant> and space characters are replaced by <constant>&quot;%ab&quot;< /constant> where <constant>ab</constant> is the hexadecimal number corresponding to the character (for example the "DB_NAME=notes;USERNAME=al%20fred" string will specify a username as "al fred"). If this formalism is not respected, then some unexpected results may occur.

Some corner cases for any string part (delimited by the semi-colon): <itemizedlist> <listitem><para>If it does not respect the "&lt;key&gt;=&lt;value&gt;" format then it will be ignored.</para></listitem> <listitem><para>Only the 1st equal character is used to separate the key from the value part (which means any other equal sign will be part of the value)</para ></listitem> </itemizedlist>

Adds new key->value pairs from the given string. If cleanup is set to true, the previous contents will be discarded before adding the new pairs.

Parameters:

this

a QuarkList.

string

a string.

cleanup

whether to cleanup the previous content or not.