<trclass="memdesc:a9ddb9a2039585b1ef3429db16ea84292"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Rerieves the full path of the application's <em>Temp</em> folder. <ahref="../../d5/d3b/_global_8h.html#a9ddb9a2039585b1ef3429db16ea84292">More...</a><br/></td></tr>
<trclass="memdesc:a996b60884ddf7728178e94f34ca12570"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Generates a <em>random</em> string. <ahref="../../d5/d3b/_global_8h.html#a996b60884ddf7728178e94f34ca12570">More...</a><br/></td></tr>
<trclass="memdesc:ad1bdb5e416839b1f85f6df68e58ae28c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Computes the <em>parity</em> of the given unsigned 32-Bit value. <ahref="../../d5/d3b/_global_8h.html#ad1bdb5e416839b1f85f6df68e58ae28c">More...</a><br/></td></tr>
<trclass="memdesc:a12259acdd6aff74ee83819d3aebd8ba9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Deletes the specified file. <ahref="../../d5/d3b/_global_8h.html#a12259acdd6aff74ee83819d3aebd8ba9">More...</a><br/></td></tr>
<trclass="memdesc:a09e919d419ded903481cf7aba702dcba"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sort a list of strings using "natural ordering" algorithm. <ahref="../../d5/d3b/_global_8h.html#a09e919d419ded903481cf7aba702dcba">More...</a><br/></td></tr>
<p>The function generates a file name that contains a <em>random</em> component and that is guaranteed to <b>not</b> exist yet. The generated file name follows a <code>"<basedir>/<random>.<ext>"</code> pattern. This is useful (not only) for creating temporary files.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">basePath</td><td>Specifies the "base" directory where the temporary file is supposed to be created. This must be a valid <em>existing</em> directory.</td></tr>
<tr><tdclass="paramname">extension</td><td>Specifies the desired file extensions of the temporary file. Do <b>not</b> include a leading dot (<code>.</code>) character.</td></tr>
<tr><tdclass="paramname">placeholder</td><td>If set to <code>true</code>, the function creates an empty "placeholder" file under the returned file name; if set to <code>false</code>, it does <em>not</em>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>If the function succeeds, it returns a QString holding the full path of the temporary file; otherwise it returns a default-constructed QString. </dd></dl>
<p>The function generates a unique file name in the specified directory. The function guarantees that the returned file name does <em>not</em> exist yet. If necessary, a <em>counter</em> will be included in the file name in order to ensure its uniqueness.</p>
<tr><tdclass="paramname">basePath</td><td>Specifies the "base" directory where the unique file is supposed to be created. This must be a valid <em>existing</em> directory.</td></tr>
<tr><tdclass="paramname">baseName</td><td>Specifies the desired "base" file name of the unqiue file. Do <b>not</b> include a file extension.</td></tr>
<tr><tdclass="paramname">extension</td><td>Specifies the desired file extensions of the unqiue file. Do <b>not</b> include a leading dot (<code>.</code>) character.</td></tr>
<tr><tdclass="paramname">fancy</td><td>If set to <code>true</code>, the file name is generated according to the <code>"<basedir>/<basename> (N).<ext>"</code> pattern; if set to <code>false</code>, the file name is generated according to the <code>"<basedir>/<basename>.XXXX.<ext>"</code> pattern.</td></tr>
<dlclass="section return"><dt>Returns</dt><dd>If the function succeeds, it returns a QString holding the full path of the unique file; otherwise it returns a default-constructed QString. </dd></dl>
<p>Sort a list of strings using "natural ordering" algorithm. </p>
<p>This function implements a sort algorithm that orders alphanumeric strings in the way a human being would. See <ahref="http://sourcefrog.net/projects/natsort/"><em>Natural Order String Comparison</em></a> for details!</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">list</td><td>A reference to the QStringList object to be sorted. The list will be sorted "in place". </td></tr>
<p>The random string is generated using the same PRNG as the <code><aclass="el"href="../../d5/d3b/_global_8h.html#a15762bf5b0239e5f67a3815d63ed441a"title="Generates a random unsigned 64-Bit value. ">next_rand_u64()</a></code> function. The <em>random</em> bytes are converted to a hexadecimal string and, if necessary, zero-padded to a toal length of 16 or 32 characters. There is <b>no</b><code>0x</code>-prefix included in the result.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">bLong</td><td>If set to <code>true</code>, a "long" random string (32 characters) will be generated; if set to <code>false</code>, a "short" random string (16 characters) is generated.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The function retruns a QString holding a <em>random</em> hexadecimal string </dd></dl>
<p>Generates a <em>random</em> unsigned 32-Bit value. </p>
<p>The <em>random</em> value is created using a "strong" PRNG of the underlying system, if possible. Otherwise a fallback PRNG is used. It is <b>not</b> required or useful to call <code>srand()</code> or <code>qsrand()</code> prior to using this function. If necessary, the seeding of the PRNG happen <em>automatically</em> on the first call.</p>
<dlclass="section return"><dt>Returns</dt><dd>The function retruns a <em>random</em> unsigned 32-Bit value. </dd></dl>
<p>Generates a <em>random</em> unsigned 64-Bit value. </p>
<p>The <em>random</em> value is created using a "strong" PRNG of the underlying system, if possible. Otherwise a fallback PRNG is used. It is <b>not</b> required or useful to call <code>srand()</code> or <code>qsrand()</code> prior to using this function. If necessary, the seeding of the PRNG happen <em>automatically</em> on the first call.</p>
<dlclass="section return"><dt>Returns</dt><dd>The function retruns a <em>random</em> unsigned 64-Bit value. </dd></dl>
<p>Computes the <em>parity</em> of the given unsigned 32-Bit value. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">value</td><td>The 32-Bit unsigned value from which the parity is to be computed.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The function returns <code>true</code>, if the number of <b>1</b> bits in the given value is <em>odd</em>; it returns <code>false</code>, if the number of <b>1</b> bits in the given value is <em>even</em>. </dd></dl>
<p>Recursively deletes the specified directory. </p>
<p>The function deletes the specified directory. In <em>recusive</em> mode, the directory will be removed including all of its files and sub-directories. Files are deleted using the <code><aclass="el"href="../../d5/d3b/_global_8h.html#a12259acdd6aff74ee83819d3aebd8ba9"title="Deletes the specified file. ">remove_file()</a></code> function.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">folderPath</td><td>The path to the directory to be deleted. This should be a full path.</td></tr>
<tr><tdclass="paramname">recursive</td><td>If set to <code>true</code> the function removes all files and sub-directories in the specified directory; if set to <code>false</code>, the function will <em>not</em> try to delete any files or sub-directories, which means that it will fail on non-empty directories.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The function returns <code>true</code>, if the directory was deleted successfully or if the directory doesn't exist; it returns <code>false</code>, if the directory could <em>not</em> be deleted. </dd></dl>
<p>The function deletes the specified file, even if it has the "read only" flag set. If the file is currently locked (e.g. by another process), the function retries multiple times to delete the file before it fails.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">fileName</td><td>The path to the file to be deleted. This should be a full path.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The function returns <code>true</code>, if the file was deleted successfully or if the file doesn't exist; it returns <code>false</code>, if the file could <em>not</em> be deleted. </dd></dl>
<p>The application's <em>Temp</em> folder is a unique application-specific folder, intended to store any temporary files that the application may need. It will be created when this function is called for the first time (lazy initialization); subsequent calls are guaranteed to return the same path. Usually the application's <em>Temp</em> folder will be created as a sub-folder of the system's global <em>Temp</em> folder, as indicated by the <code>TMP</code> or <code>TEMP</code> environment variables. However, it may be created at a different place (e.g. in the users <em>Profile</em> directory), if those environment variables don't point to a usable directory. In any case, this function makes sure that the application's <em>Temp</em> folder exists for the whole lifetime of the application and that it is writable. When the application is about to terminate, the application's <em>Temp</em> folder and all files or sub-directories thereof will be <em>removed</em> automatically!</p>
<dlclass="section return"><dt>Returns</dt><dd>If the function succeeds, it returns a read-only reference to a QString holding the full path of the application's <em>Temp</em> folder; otherwise a read-only reference to a default-constructed QString is returned. </dd></dl>
<p>The function removes all <em>leading</em> white-space characters from the specified string. Trailing white-space characters are <em>not</em> removed. White-space characters are defined by the <code>\s</code> character class.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">str</td><td>A reference to the QString object to be trimmed. This QString object will be modified directly.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A reference to the trimmed QString object. This is the same QString object that was specified in the <code>str</code> parameter. </dd></dl>
<p>The function removes all <em>leading</em> white-space characters from the specified string. Trailing white-space characters are <em>not</em> removed. White-space characters are defined by the <code>\s</code> character class.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">str</td><td>A read-only reference to the QString object to be trimmed. The original QString object is <em>not</em> modified.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A new QString object that equals the original QString object, except that it has all <em>leading</em> white-space characters removed. </dd></dl>
<p>The function removes all <em>trailing</em> white-space characters from the specified string. Leading white-space characters are <em>not</em> removed. White-space characters are defined by the <code>\s</code> character class.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">str</td><td>A reference to the QString object to be trimmed. This QString object will be modified directly.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A reference to the trimmed QString object. This is the same QString object that was specified in the <code>str</code> parameter. </dd></dl>
<p>The function removes all <em>trailing</em> white-space characters from the specified string. Leading white-space characters are <em>not</em> removed. White-space characters are defined by the <code>\s</code> character class.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">str</td><td>A read-only reference to the QString object to be trimmed. The original QString object is <em>not</em> modified.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A new QString object that equals the original QString object, except that it has all <em>trailing</em> white-space characters removed. </dd></dl>