<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>
<trclass="memdesc:a4fcbdafffc1224776616fcc6aec8278b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieve a list of all available codepages. <ahref="../../d5/d3b/_global_8h.html#a4fcbdafffc1224776616fcc6aec8278b">More...</a><br/></td></tr>
<p>Retrieve a list of all available codepages. </p>
<p>The function generates a list of all codepages that are available on the system. Each codepage name returned by this function may be passed to the <code>QTextCodec::codecForName()</code> function in order to obtain a corresponding <ahref="http://doc.qt.io/qt-4.8/qtextcodec.html">QTextCodec</a> object.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">noAliases</td><td>If set to <code>true</code>, only distinct codepages are returned, i.e. any codepage aliases are discarded from the list; if set to <code>false</code>, the returned list may (and usually will) also contain codepage aliases.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>If the function succeeds, it returns a QStringList holding the names of all codepages available on the system; otherwise it returns a default-constructed QStringList. </dd></dl>
<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 unique file. Do <b>not</b> include a file extension.</td></tr>
<tr><tdclass="paramname">extension</td><td>Specifies the desired file extensions of the unique 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>
<tr><tdclass="paramname">list</td><td>A reference to the QStringList object to be sorted. The list will be sorted "in place".</td></tr>
<tr><tdclass="paramname">bIgnoreCase</td><td>If set to <code>true</code>, the list will be sorted disregarding the character case, i.e. upper-case and lower-case characters (of the same letter) are treated the same; if set to <code>false</code>, the character case <em>is</em> taken into account. </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>
<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>
<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>
<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>This function tries to parses the result (capture) of a regular expression as an unsigned 32-Bit value. The given regular expression must contain at least <em>one</em> capture. Only the <em>first</em> capture is considered, additional captures are ignored.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">regexp</td><td>A read-only reference to the <ahref="http://doc.qt.io/qt-4.8/qregexp.html">QRegExp</a> object whose result (capture) will be parsed. This <ahref="http://doc.qt.io/qt-4.8/qregexp.html">QRegExp</a> must already have been <em>successfully</em> matched against the respective input string, e.g. via <code>QRegExp::indexIn()</code>, prior to calling this function.</td></tr>
<tr><tdclass="paramname">value</td><td>A reference to a variable of type <code>quint32</code>, where the unsigned 32-Bit representation of the result will be stored. The contents of this variable are <em>undefined</em>, if the function failed.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The function returns <code>true</code>, if the regular expression's capture could be parsed successfully; it returns <code>false</code>, if the capture contains an invalid string or if there are insufficient captures in given the <ahref="http://doc.qt.io/qt-4.8/qregexp.html">QRegExp</a> object. </dd></dl>
<p>This function tries to parses the results (captures) of a regular expression as unsigned 32-Bit values. The given regular expression must contain at least <code>count</code> captures. Only the <em>first</em><code>count</code> captures are considered, additional captures are ignored.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">regexp</td><td>A read-only reference to the <ahref="http://doc.qt.io/qt-4.8/qregexp.html">QRegExp</a> object whose results (captures) will be parsed. This <ahref="http://doc.qt.io/qt-4.8/qregexp.html">QRegExp</a> must already have been <em>successfully</em> matched against the respective input string, e.g. via <code>QRegExp::indexIn()</code>, prior to calling this function.</td></tr>
<tr><tdclass="paramname">value</td><td>A pointer to an array of type <code>quint32</code>, where the unsigned 32-Bit representations of the results will be stored (the <code>n</code>-th result is stored at <code>value[n-1]</code>). The array must be at least <code>count</code> elements in length. The contents of this array are <em>undefined</em>, if the function failed.</td></tr>
<tr><tdclass="paramname">count</td><td>Specifies the number of results (captures) in the given <ahref="http://doc.qt.io/qt-4.8/qregexp.html">QRegExp</a> object. The function tries to parse the first <code>count</code> captures and ignores any additional captures that may exist. This parameter also determines the required (minimum) length of the <code>value</code> array.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The function returns <code>true</code>, if all of the regular expression's captures could be parsed successfully; it returns <code>false</code>, if any of the captures contain an invalid string or if there are insufficient captures in given the <ahref="http://doc.qt.io/qt-4.8/qregexp.html">QRegExp</a> object. </dd></dl>
<p>The function deletes the specified directory. In <em>recursive</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>
<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 terminates normally, 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>