<ahref="#pub-static-methods">Static Public Member Functions</a>|
<ahref="classcrashpad_1_1internal_1_1MinidumpWriterUtil-members.html">List of all members</a></div>
<divclass="headertitle">
<divclass="title">crashpad::internal::MinidumpWriterUtil Class Reference<spanclass="mlabels"><spanclass="mlabel">final</span></span></div></div>
</div><!--header-->
<divclass="contents">
<p>A collection of utility functions used by the <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html"title="The base class for all content that might be written to a minidump file. ">MinidumpWritable</a> family of classes.
<trclass="memdesc:adf79feb4d657af5606d77a040b80c0a3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Assigns a <code>time_t</code> value, logging a warning if the result overflows the destination buffer and will be truncated. <ahref="#adf79feb4d657af5606d77a040b80c0a3">More...</a><br/></td></tr>
<trclass="memdesc:a61b0a78e6ca458d986024a21d94ca70b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Converts a UTF-8 string to UTF-16 and returns it. If the string cannot be converted losslessly, indicating that the input is not well-formed UTF-8, a warning is logged. <ahref="#a61b0a78e6ca458d986024a21d94ca70b">More...</a><br/></td></tr>
<trclass="memdesc:a8050fbfd03eaf9c799001d37f417adec"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Converts a UTF-8 string to UTF-16 and places it into a buffer of fixed size, taking care to <code>NUL</code>-terminate the buffer and not to overflow it. If the string will be truncated or if it cannot be converted losslessly, a warning is logged. <ahref="#a8050fbfd03eaf9c799001d37f417adec">More...</a><br/></td></tr>
<divclass="textblock"><p>A collection of utility functions used by the <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html"title="The base class for all content that might be written to a minidump file. ">MinidumpWritable</a> family of classes. </p>
</div><h2class="groupheader">Member Function Documentation</h2>
<p>Assigns a <code>time_t</code> value, logging a warning if the result overflows the destination buffer and will be truncated. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">destination</td><td>A pointer to the variable to be assigned to. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">source</td><td>The value to assign.</td></tr>
</table>
</dd>
</dl>
<p>The minidump format uses <code>uint32_t</code> for many timestamp values, but <code>time_t</code> may be wider than this. These year 2038 bugs are a limitation of the minidump format. An out-of-range error will be noted with a warning, but is not considered fatal. <em>source</em> will be truncated and assigned to <em>destination</em> in this case.</p>
<p>For <code>time_t</code> values with nonfatal overflow semantics, this function is used in preference to <aclass="el"href="namespacecrashpad.html#aeb040202b4562c8c4087b9c9db2ce430"title="Performs an assignment if it can be done safely, and signals if it cannot be done safely...">AssignIfInRange()</a>, which fails without performing an assignment when an out-of-range condition is detected. </p>
<p>Converts a UTF-8 string to UTF-16 and places it into a buffer of fixed size, taking care to <code>NUL</code>-terminate the buffer and not to overflow it. If the string will be truncated or if it cannot be converted losslessly, a warning is logged. </p>
<p>Any unused portion of the <em>destination</em> buffer that is not written to by the converted string will be overwritten with <code>NUL</code> UTF-16 code units, thus, this function always writes <em>destination_size</em><code>char16</code> units.</p>
<p>If the conversion is lossy, U+FFFD “replacement characters” will be introduced.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">destination</td><td>A pointer to the destination buffer, where the UTF-16-encoded string will be written. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">destination_size</td><td>The size of <em>destination</em> in <code>char16</code> units, including space used by a <code>NUL</code> terminator. </td></tr>
<p>Converts a UTF-8 string to UTF-16 and returns it. If the string cannot be converted losslessly, indicating that the input is not well-formed UTF-8, a warning is logged. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">utf8</td><td>The UTF-8-encoded string to convert.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The <em>utf8</em> string, converted to UTF-16 encoding. If the conversion is lossy, U+FFFD “replacement characters” will be introduced. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>minidump/minidump_writer_util.h</li>
<li>minidump/minidump_writer_util.cc</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hrclass="footer"/><addressclass="footer"><small>
Generated by  <ahref="http://www.doxygen.org/index.html">