Include dependency graph for int_to_string.c:</div>
<divclass="dyncontent">
<divclass="center"><iframescrolling="no"frameborder="0"src="../../db/d37/int__to__string_8c__incl.svg"width="531"height="127"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
<trclass="memitem:a969911f32f1c435bb2bf166574ef9ae5"><tdclass="memItemLeft"align="right"valign="top">char * </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="../../dd/d53/int__to__string_8c.html#a969911f32f1c435bb2bf166574ef9ae5">int_to_string</a> (uint16_t value, char *dest, int base)</td></tr>
<trclass="memdesc:a969911f32f1c435bb2bf166574ef9ae5"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Converts an integer value to a null-terminated string using the specified base and stores the result in the array given by str parameter. <ahref="../../dd/d53/int__to__string_8c.html#a969911f32f1c435bb2bf166574ef9ae5">More...</a><br/></td></tr>
<p>Converts an integer value to a null-terminated string using the specified base and stores the result in the array given by str parameter. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">value</td><td>Value to be converted to a string. </td></tr>
<tr><tdclass="paramname">dest</td><td>pointer to array in memory to store the resulting null-terminated string. </td></tr>
<tr><tdclass="paramname">base</td><td>Numerical base used to represent the value as a string, between 2 and 16, where 10 means decimal base, 16 hexadecimal, 8 octal, and 2 binary. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A pointer to the resulting null-terminated string, same as parameter str. </dd></dl>
<dlclass="section note"><dt>Note</dt><dd>The destination array must be pre-allocated by the calling function. </dd></dl>
<divclass="line"><aname="l00038"></a><spanclass="lineno"> 38</span> <spanclass="keywordflow">for</span> (<spanclass="keywordtype">int</span> i = 0, limit = len / 2; i < limit; ++i)</div>
<divclass="line"><aname="l00057"></a><spanclass="lineno"> 57</span> <spanclass="keywordflow">for</span> (<spanclass="keywordtype">int</span> i = 1; i <= 100; ++i) <spanclass="comment">/* test 100 random numbers */</span></div>
<divclass="line"><aname="l00064"></a><spanclass="lineno"> 64</span>  snprintf(str1, <aclass="code"href="../../db/dd5/prime__seive_8c.html#ac1215a37edfa07d37edf6ec65f2235c7">MAX_SIZE</a>, <spanclass="stringliteral">"%o"</span>, value); <spanclass="comment">//* standard C - to octal */</span></div>
<divclass="line"><aname="l00066"></a><spanclass="lineno"> 66</span>  snprintf(str1, <aclass="code"href="../../db/dd5/prime__seive_8c.html#ac1215a37edfa07d37edf6ec65f2235c7">MAX_SIZE</a>, <spanclass="stringliteral">"%d"</span>, value); <spanclass="comment">/* standard C - to decimal */</span></div>
<divclass="line"><aname="l00068"></a><spanclass="lineno"> 68</span>  snprintf(str1, <aclass="code"href="../../db/dd5/prime__seive_8c.html#ac1215a37edfa07d37edf6ec65f2235c7">MAX_SIZE</a>, <spanclass="stringliteral">"%x"</span>, value); <spanclass="comment">/* standard C - to hexadecimal */</span></div>
<divclass="ttc"id="aint__to__string_8c_html_a969911f32f1c435bb2bf166574ef9ae5"><divclass="ttname"><ahref="../../dd/d53/int__to__string_8c.html#a969911f32f1c435bb2bf166574ef9ae5">int_to_string</a></div><divclass="ttdeci">char * int_to_string(uint16_t value, char *dest, int base)</div><divclass="ttdoc">Converts an integer value to a null-terminated string using the specified base and stores the result ...</div><divclass="ttdef"><b>Definition:</b> int_to_string.c:25</div></div>
<divclass="ttc"id="amalloc__dbg_8h_html_a9cc854374299a1dd933bf62029761768"><divclass="ttname"><ahref="../../d2/ddd/malloc__dbg_8h.html#a9cc854374299a1dd933bf62029761768">free</a></div><divclass="ttdeci">#define free(ptr)</div><divclass="ttdoc">This macro replace the standard free function with free_dbg.</div><divclass="ttdef"><b>Definition:</b> malloc_dbg.h:26</div></div>
<divclass="ttc"id="amalloc__dbg_8h_html_afdddaa949a93c1ef559a638e98f9c21b"><divclass="ttname"><ahref="../../d2/ddd/malloc__dbg_8h.html#afdddaa949a93c1ef559a638e98f9c21b">calloc</a></div><divclass="ttdeci">#define calloc(elemCount, elemSize)</div><divclass="ttdoc">This macro replace the standard calloc function with calloc_dbg.</div><divclass="ttdef"><b>Definition:</b> malloc_dbg.h:22</div></div>
<divclass="ttc"id="aprime__seive_8c_html_ac1215a37edfa07d37edf6ec65f2235c7"><divclass="ttname"><ahref="../../db/dd5/prime__seive_8c.html#ac1215a37edfa07d37edf6ec65f2235c7">MAX_SIZE</a></div><divclass="ttdeci">const unsigned long long MAX_SIZE</div><divclass="ttdoc">for assert for standard input output for general purpose standard library</div><divclass="ttdef"><b>Definition:</b> prime_seive.c:11</div></div>
<divclass="center"><iframescrolling="no"frameborder="0"src="../../dd/d53/int__to__string_8c_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg"width="196"height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<divid="nav-path"class="navpath"><!-- id is needed for treeview function! -->
<liclass="footer">Generated by <ahref="https://www.doxygen.org/index.html"><imgclass="footer"src="../../doxygen.svg"width="104"height="31"alt="doxygen"/></a> 1.9.1 </li>