cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

asm_2gbz80_2string_8h.html (28857B)


      1<!-- HTML header for doxygen 1.8.14-->
      2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      3<html xmlns="http://www.w3.org/1999/xhtml">
      4<head>
      5<meta http-equiv="cache-control" content="max-age=86400"/>
      6<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
      7<meta http-equiv="X-UA-Compatible" content="IE=9"/>
      8<meta name="generator" content="Doxygen 1.8.20"/>
      9<meta name="viewport" content="width=device-width, initial-scale=1"/>
     10<title>GBDK 2020 Docs: asm/gbz80/string.h File Reference</title>
     11<link href="tabs.css" rel="stylesheet" type="text/css"/>
     12<script type="text/javascript" src="jquery.js"></script>
     13<script type="text/javascript" src="dynsections.js"></script>
     14<link href="navtree.css" rel="stylesheet" type="text/css"/>
     15<script type="text/javascript" src="resize.js"></script>
     16<script type="text/javascript" src="navtreedata.js"></script>
     17<script type="text/javascript" src="navtree.js"></script>
     18<link href="search/search.css" rel="stylesheet" type="text/css"/>
     19<script type="text/javascript" src="search/searchdata.js"></script>
     20<script type="text/javascript" src="search/search.js"></script>
     21<link href="doxygen.css" rel="stylesheet" type="text/css" />
     22<link href="doxygen_extra.css" rel="stylesheet" type="text/css"/>
     23</head>
     24<body>
     25<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
     26<div id="titlearea">
     27<table cellspacing="0" cellpadding="0">
     28 <tbody>
     29 <tr style="height: 56px;">
     30  <td id="projectalign" style="padding-left: 0.5em;">
     31   <div id="projectname">GBDK 2020 Docs
     32   &#160;<span id="projectnumber">4.0.6</span>
     33   </div>
     34   <div id="projectbrief">API Documentation for GBDK 2020</div>
     35  </td>
     36 </tr>
     37 </tbody>
     38</table>
     39</div>
     40<!-- end header part -->
     41<!-- Generated by Doxygen 1.8.20 -->
     42<script type="text/javascript">
     43/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
     44var searchBox = new SearchBox("searchBox", "search",false,'Search');
     45/* @license-end */
     46</script>
     47<script type="text/javascript" src="menudata.js"></script>
     48<script type="text/javascript" src="menu.js"></script>
     49<script type="text/javascript">
     50/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
     51$(function() {
     52  initMenu('',true,false,'search.php','Search');
     53  $(document).ready(function() { init_search(); });
     54});
     55/* @license-end */</script>
     56<div id="main-nav"></div>
     57</div><!-- top -->
     58<div id="side-nav" class="ui-resizable side-nav-resizable">
     59  <div id="nav-tree">
     60    <div id="nav-tree-contents">
     61      <div id="nav-sync" class="sync"></div>
     62    </div>
     63  </div>
     64  <div id="splitbar" style="-moz-user-select:none;" 
     65       class="ui-resizable-handle">
     66  </div>
     67</div>
     68<script type="text/javascript">
     69/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
     70$(document).ready(function(){initNavTree('asm_2gbz80_2string_8h.html',''); initResizable(); });
     71/* @license-end */
     72</script>
     73<div id="doc-content">
     74<!-- window showing the filter options -->
     75<div id="MSearchSelectWindow"
     76     onmouseover="return searchBox.OnSearchSelectShow()"
     77     onmouseout="return searchBox.OnSearchSelectHide()"
     78     onkeydown="return searchBox.OnSearchSelectKey(event)">
     79</div>
     80
     81<!-- iframe showing the search results (closed by default) -->
     82<div id="MSearchResultsWindow">
     83<iframe src="javascript:void(0)" frameborder="0" 
     84        name="MSearchResults" id="MSearchResults">
     85</iframe>
     86</div>
     87
     88<div class="header">
     89  <div class="summary">
     90<a href="#func-members">Functions</a> &#124;
     91<a href="#var-members">Variables</a>  </div>
     92  <div class="headertitle">
     93<div class="title">string.h File Reference</div>  </div>
     94</div><!--header-->
     95<div class="contents">
     96<div class="textblock"><code>#include &lt;<a class="el" href="asm_2gbz80_2types_8h_source.html">types.h</a>&gt;</code><br />
     97</div>
     98<p><a href="asm_2gbz80_2string_8h_source.html">Go to the source code of this file.</a></p>
     99<table class="memberdecls">
    100<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
    101Functions</h2></td></tr>
    102<tr class="memitem:ada128b5ed545214bb397d1399615ec9e"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2gbz80_2string_8h.html#ada128b5ed545214bb397d1399615ec9e">strcpy</a> (char *dest, const char *src) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
    103<tr class="separator:ada128b5ed545214bb397d1399615ec9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
    104<tr class="memitem:a7172770a053aa1fe0ab46a97ab43a5fa"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2gbz80_2string_8h.html#a7172770a053aa1fe0ab46a97ab43a5fa">strcmp</a> (const char *s1, const char *s2) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
    105<tr class="separator:a7172770a053aa1fe0ab46a97ab43a5fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
    106<tr class="memitem:a6a1a6cbe7fb6102819098340a4986574"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2gbz80_2string_8h.html#a6a1a6cbe7fb6102819098340a4986574">memcpy</a> (void *dest, const void *src, <a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a> len) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
    107<tr class="separator:a6a1a6cbe7fb6102819098340a4986574"><td class="memSeparator" colspan="2">&#160;</td></tr>
    108<tr class="memitem:a802c986820d3866639922b6bc9484f90"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2gbz80_2string_8h.html#a802c986820d3866639922b6bc9484f90">memmove</a> (void *dest, const void *src, <a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a> n)</td></tr>
    109<tr class="separator:a802c986820d3866639922b6bc9484f90"><td class="memSeparator" colspan="2">&#160;</td></tr>
    110<tr class="memitem:a4bc4146b1a053fc4ec10f1377bb21a4f"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2gbz80_2string_8h.html#a4bc4146b1a053fc4ec10f1377bb21a4f">memset</a> (void *s, int <a class="el" href="sms_8h.html#a0b3366755f3276b0243c1e0497471b7a">c</a>, <a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a> n) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
    111<tr class="separator:a4bc4146b1a053fc4ec10f1377bb21a4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
    112<tr class="memitem:a476b2b37367c65c6cb36037bfc16b19f"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2gbz80_2string_8h.html#a476b2b37367c65c6cb36037bfc16b19f">reverse</a> (char *s) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
    113<tr class="separator:a476b2b37367c65c6cb36037bfc16b19f"><td class="memSeparator" colspan="2">&#160;</td></tr>
    114<tr class="memitem:a8908188ae9fc2f05d993257ef001d553"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2gbz80_2string_8h.html#a8908188ae9fc2f05d993257ef001d553">strcat</a> (char *s1, const char *s2)</td></tr>
    115<tr class="separator:a8908188ae9fc2f05d993257ef001d553"><td class="memSeparator" colspan="2">&#160;</td></tr>
    116<tr class="memitem:a5e4982e9d2fd4ec328abfda6b1a3f7e5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2gbz80_2string_8h.html#a5e4982e9d2fd4ec328abfda6b1a3f7e5">strlen</a> (const char *s) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
    117<tr class="separator:a5e4982e9d2fd4ec328abfda6b1a3f7e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
    118<tr class="memitem:af70714f788819be9dbf368a969be23f7"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2gbz80_2string_8h.html#af70714f788819be9dbf368a969be23f7">strncat</a> (char *s1, const char *s2, int n)</td></tr>
    119<tr class="separator:af70714f788819be9dbf368a969be23f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
    120<tr class="memitem:ab745ed93c0024648f33dc1d553e9fdcc"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2gbz80_2string_8h.html#ab745ed93c0024648f33dc1d553e9fdcc">strncmp</a> (const char *s1, const char *s2, int n)</td></tr>
    121<tr class="separator:ab745ed93c0024648f33dc1d553e9fdcc"><td class="memSeparator" colspan="2">&#160;</td></tr>
    122<tr class="memitem:a21ae87d60fcc456369668093c57db61f"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2gbz80_2string_8h.html#a21ae87d60fcc456369668093c57db61f">strncpy</a> (char *s1, const char *s2, int n)</td></tr>
    123<tr class="separator:a21ae87d60fcc456369668093c57db61f"><td class="memSeparator" colspan="2">&#160;</td></tr>
    124<tr class="memitem:a52701f453c97403ec1b12d286484259b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2gbz80_2string_8h.html#a52701f453c97403ec1b12d286484259b">memcmp</a> (const void *buf1, const void *buf2, <a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a> count) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
    125<tr class="separator:a52701f453c97403ec1b12d286484259b"><td class="memSeparator" colspan="2">&#160;</td></tr>
    126</table><table class="memberdecls">
    127<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
    128Variables</h2></td></tr>
    129<tr class="memitem:a0b3366755f3276b0243c1e0497471b7a"><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2gbz80_2string_8h.html#a0b3366755f3276b0243c1e0497471b7a">c</a></td></tr>
    130<tr class="separator:a0b3366755f3276b0243c1e0497471b7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
    131</table>
    132<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
    133<div class="textblock"><p>Generic string functions. </p>
    134</div><h2 class="groupheader">Function Documentation</h2>
    135<a id="ada128b5ed545214bb397d1399615ec9e"></a>
    136<h2 class="memtitle"><span class="permalink"><a href="#ada128b5ed545214bb397d1399615ec9e">&#9670;&nbsp;</a></span>strcpy()</h2>
    137
    138<div class="memitem">
    139<div class="memproto">
    140      <table class="memname">
    141        <tr>
    142          <td class="memname">char* strcpy </td>
    143          <td>(</td>
    144          <td class="paramtype">char *&#160;</td>
    145          <td class="paramname"><em>dest</em>, </td>
    146        </tr>
    147        <tr>
    148          <td class="paramkey"></td>
    149          <td></td>
    150          <td class="paramtype">const char *&#160;</td>
    151          <td class="paramname"><em>src</em>&#160;</td>
    152        </tr>
    153        <tr>
    154          <td></td>
    155          <td>)</td>
    156          <td></td><td></td>
    157        </tr>
    158      </table>
    159</div><div class="memdoc">
    160<p>Copies the string pointed to by <b>src</b> (including the terminating &lsquo;\0&rsquo; character) to the array pointed to by <b>dest</b>.</p>
    161<p>The strings may not overlap, and the destination string dest must be large enough to receive the copy.</p>
    162<dl class="params"><dt>Parameters</dt><dd>
    163  <table class="params">
    164    <tr><td class="paramname">dest</td><td>Array to copy into </td></tr>
    165    <tr><td class="paramname">src</td><td>Array to copy from</td></tr>
    166  </table>
    167  </dd>
    168</dl>
    169<dl class="section return"><dt>Returns</dt><dd>A pointer to dest </dd></dl>
    170
    171</div>
    172</div>
    173<a id="a7172770a053aa1fe0ab46a97ab43a5fa"></a>
    174<h2 class="memtitle"><span class="permalink"><a href="#a7172770a053aa1fe0ab46a97ab43a5fa">&#9670;&nbsp;</a></span>strcmp()</h2>
    175
    176<div class="memitem">
    177<div class="memproto">
    178      <table class="memname">
    179        <tr>
    180          <td class="memname">int strcmp </td>
    181          <td>(</td>
    182          <td class="paramtype">const char *&#160;</td>
    183          <td class="paramname"><em>s1</em>, </td>
    184        </tr>
    185        <tr>
    186          <td class="paramkey"></td>
    187          <td></td>
    188          <td class="paramtype">const char *&#160;</td>
    189          <td class="paramname"><em>s2</em>&#160;</td>
    190        </tr>
    191        <tr>
    192          <td></td>
    193          <td>)</td>
    194          <td></td><td></td>
    195        </tr>
    196      </table>
    197</div><div class="memdoc">
    198<p>Compares strings</p>
    199<dl class="params"><dt>Parameters</dt><dd>
    200  <table class="params">
    201    <tr><td class="paramname">s1</td><td>First string to compare </td></tr>
    202    <tr><td class="paramname">s2</td><td>Second string to compare</td></tr>
    203  </table>
    204  </dd>
    205</dl>
    206<p>Returns: </p><ul>
    207<li>&gt; 0 if <b>s1</b> &gt; <b>s2</b> </li>
    208<li>0 if <b>s1</b> == <b>s2</b> </li>
    209<li>&lt; 0 if <b>s1</b> &lt; <b>s2</b> </li>
    210</ul>
    211
    212</div>
    213</div>
    214<a id="a6a1a6cbe7fb6102819098340a4986574"></a>
    215<h2 class="memtitle"><span class="permalink"><a href="#a6a1a6cbe7fb6102819098340a4986574">&#9670;&nbsp;</a></span>memcpy()</h2>
    216
    217<div class="memitem">
    218<div class="memproto">
    219      <table class="memname">
    220        <tr>
    221          <td class="memname">void* memcpy </td>
    222          <td>(</td>
    223          <td class="paramtype">void *&#160;</td>
    224          <td class="paramname"><em>dest</em>, </td>
    225        </tr>
    226        <tr>
    227          <td class="paramkey"></td>
    228          <td></td>
    229          <td class="paramtype">const void *&#160;</td>
    230          <td class="paramname"><em>src</em>, </td>
    231        </tr>
    232        <tr>
    233          <td class="paramkey"></td>
    234          <td></td>
    235          <td class="paramtype"><a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
    236          <td class="paramname"><em>len</em>&#160;</td>
    237        </tr>
    238        <tr>
    239          <td></td>
    240          <td>)</td>
    241          <td></td><td></td>
    242        </tr>
    243      </table>
    244</div><div class="memdoc">
    245<p>Copies n bytes from memory area src to memory area dest.</p>
    246<p>The memory areas may not overlap.</p>
    247<dl class="params"><dt>Parameters</dt><dd>
    248  <table class="params">
    249    <tr><td class="paramname">dest</td><td>Buffer to copy into </td></tr>
    250    <tr><td class="paramname">src</td><td>Buffer to copy from </td></tr>
    251    <tr><td class="paramname">len</td><td>Number of Bytes to copy </td></tr>
    252  </table>
    253  </dd>
    254</dl>
    255
    256</div>
    257</div>
    258<a id="a802c986820d3866639922b6bc9484f90"></a>
    259<h2 class="memtitle"><span class="permalink"><a href="#a802c986820d3866639922b6bc9484f90">&#9670;&nbsp;</a></span>memmove()</h2>
    260
    261<div class="memitem">
    262<div class="memproto">
    263      <table class="memname">
    264        <tr>
    265          <td class="memname">void* memmove </td>
    266          <td>(</td>
    267          <td class="paramtype">void *&#160;</td>
    268          <td class="paramname"><em>dest</em>, </td>
    269        </tr>
    270        <tr>
    271          <td class="paramkey"></td>
    272          <td></td>
    273          <td class="paramtype">const void *&#160;</td>
    274          <td class="paramname"><em>src</em>, </td>
    275        </tr>
    276        <tr>
    277          <td class="paramkey"></td>
    278          <td></td>
    279          <td class="paramtype"><a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
    280          <td class="paramname"><em>n</em>&#160;</td>
    281        </tr>
    282        <tr>
    283          <td></td>
    284          <td>)</td>
    285          <td></td><td></td>
    286        </tr>
    287      </table>
    288</div><div class="memdoc">
    289<p>Copies n bytes from memory area src to memory area dest, areas may overlap </p>
    290
    291</div>
    292</div>
    293<a id="a4bc4146b1a053fc4ec10f1377bb21a4f"></a>
    294<h2 class="memtitle"><span class="permalink"><a href="#a4bc4146b1a053fc4ec10f1377bb21a4f">&#9670;&nbsp;</a></span>memset()</h2>
    295
    296<div class="memitem">
    297<div class="memproto">
    298      <table class="memname">
    299        <tr>
    300          <td class="memname">void* memset </td>
    301          <td>(</td>
    302          <td class="paramtype">void *&#160;</td>
    303          <td class="paramname"><em>s</em>, </td>
    304        </tr>
    305        <tr>
    306          <td class="paramkey"></td>
    307          <td></td>
    308          <td class="paramtype">int&#160;</td>
    309          <td class="paramname"><em>c</em>, </td>
    310        </tr>
    311        <tr>
    312          <td class="paramkey"></td>
    313          <td></td>
    314          <td class="paramtype"><a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
    315          <td class="paramname"><em>n</em>&#160;</td>
    316        </tr>
    317        <tr>
    318          <td></td>
    319          <td>)</td>
    320          <td></td><td></td>
    321        </tr>
    322      </table>
    323</div><div class="memdoc">
    324<p>Fills the memory region <b>s</b> with <b>n</b> bytes using value <b>c</b></p>
    325<dl class="params"><dt>Parameters</dt><dd>
    326  <table class="params">
    327    <tr><td class="paramname">s</td><td>Buffer to fill </td></tr>
    328    <tr><td class="paramname">c</td><td>char value to fill with (truncated from int) </td></tr>
    329    <tr><td class="paramname">n</td><td>Number of bytes to fill </td></tr>
    330  </table>
    331  </dd>
    332</dl>
    333
    334</div>
    335</div>
    336<a id="a476b2b37367c65c6cb36037bfc16b19f"></a>
    337<h2 class="memtitle"><span class="permalink"><a href="#a476b2b37367c65c6cb36037bfc16b19f">&#9670;&nbsp;</a></span>reverse()</h2>
    338
    339<div class="memitem">
    340<div class="memproto">
    341      <table class="memname">
    342        <tr>
    343          <td class="memname">char* reverse </td>
    344          <td>(</td>
    345          <td class="paramtype">char *&#160;</td>
    346          <td class="paramname"><em>s</em></td><td>)</td>
    347          <td></td>
    348        </tr>
    349      </table>
    350</div><div class="memdoc">
    351<p>Reverses the characters in a string</p>
    352<dl class="params"><dt>Parameters</dt><dd>
    353  <table class="params">
    354    <tr><td class="paramname">s</td><td>Pointer to string to reverse.</td></tr>
    355  </table>
    356  </dd>
    357</dl>
    358<p>For example 'abcdefg' will become 'gfedcba'.</p>
    359<p>Banked as the string must be modifiable.</p>
    360<p>Returns: Pointer to <b>s</b> </p>
    361
    362</div>
    363</div>
    364<a id="a8908188ae9fc2f05d993257ef001d553"></a>
    365<h2 class="memtitle"><span class="permalink"><a href="#a8908188ae9fc2f05d993257ef001d553">&#9670;&nbsp;</a></span>strcat()</h2>
    366
    367<div class="memitem">
    368<div class="memproto">
    369      <table class="memname">
    370        <tr>
    371          <td class="memname">char* strcat </td>
    372          <td>(</td>
    373          <td class="paramtype">char *&#160;</td>
    374          <td class="paramname"><em>s1</em>, </td>
    375        </tr>
    376        <tr>
    377          <td class="paramkey"></td>
    378          <td></td>
    379          <td class="paramtype">const char *&#160;</td>
    380          <td class="paramname"><em>s2</em>&#160;</td>
    381        </tr>
    382        <tr>
    383          <td></td>
    384          <td>)</td>
    385          <td></td><td></td>
    386        </tr>
    387      </table>
    388</div><div class="memdoc">
    389<p>Concatenate Strings. Appends string <b>s2</b> to the end of string <b>s1</b></p>
    390<dl class="params"><dt>Parameters</dt><dd>
    391  <table class="params">
    392    <tr><td class="paramname">s1</td><td>String to append onto </td></tr>
    393    <tr><td class="paramname">s2</td><td>String to copy from</td></tr>
    394  </table>
    395  </dd>
    396</dl>
    397<p>For example 'abc' and 'def' will become 'abcdef'.</p>
    398<p>String <b>s1</b> must be large enough to store both <b>s1</b> and <b>s2</b>.</p>
    399<p>Returns: Pointer to <b>s1</b> </p>
    400
    401</div>
    402</div>
    403<a id="a5e4982e9d2fd4ec328abfda6b1a3f7e5"></a>
    404<h2 class="memtitle"><span class="permalink"><a href="#a5e4982e9d2fd4ec328abfda6b1a3f7e5">&#9670;&nbsp;</a></span>strlen()</h2>
    405
    406<div class="memitem">
    407<div class="memproto">
    408      <table class="memname">
    409        <tr>
    410          <td class="memname">int strlen </td>
    411          <td>(</td>
    412          <td class="paramtype">const char *&#160;</td>
    413          <td class="paramname"><em>s</em></td><td>)</td>
    414          <td></td>
    415        </tr>
    416      </table>
    417</div><div class="memdoc">
    418<p>Calculates the length of a string</p>
    419<dl class="params"><dt>Parameters</dt><dd>
    420  <table class="params">
    421    <tr><td class="paramname">s</td><td>String to calculate length of</td></tr>
    422  </table>
    423  </dd>
    424</dl>
    425<p>Returns: Length of string not including the terminating &lsquo;\0&rsquo; character. </p>
    426
    427</div>
    428</div>
    429<a id="af70714f788819be9dbf368a969be23f7"></a>
    430<h2 class="memtitle"><span class="permalink"><a href="#af70714f788819be9dbf368a969be23f7">&#9670;&nbsp;</a></span>strncat()</h2>
    431
    432<div class="memitem">
    433<div class="memproto">
    434      <table class="memname">
    435        <tr>
    436          <td class="memname">char* strncat </td>
    437          <td>(</td>
    438          <td class="paramtype">char *&#160;</td>
    439          <td class="paramname"><em>s1</em>, </td>
    440        </tr>
    441        <tr>
    442          <td class="paramkey"></td>
    443          <td></td>
    444          <td class="paramtype">const char *&#160;</td>
    445          <td class="paramname"><em>s2</em>, </td>
    446        </tr>
    447        <tr>
    448          <td class="paramkey"></td>
    449          <td></td>
    450          <td class="paramtype">int&#160;</td>
    451          <td class="paramname"><em>n</em>&#160;</td>
    452        </tr>
    453        <tr>
    454          <td></td>
    455          <td>)</td>
    456          <td></td><td></td>
    457        </tr>
    458      </table>
    459</div><div class="memdoc">
    460<p>Concatenate at most <b>n</b> characters from string <b>s2</b> onto the end of <b>s1</b>.</p>
    461<dl class="params"><dt>Parameters</dt><dd>
    462  <table class="params">
    463    <tr><td class="paramname">s1</td><td>String to append onto </td></tr>
    464    <tr><td class="paramname">s2</td><td>String to copy from </td></tr>
    465    <tr><td class="paramname">n</td><td>Max number of characters to copy from <b>s2</b></td></tr>
    466  </table>
    467  </dd>
    468</dl>
    469<p>String <b>s1</b> must be large enough to store both <b>s1</b> and <b>n</b> characters of <b>s2</b></p>
    470<p>Returns: Pointer to <b>s1</b> </p>
    471
    472</div>
    473</div>
    474<a id="ab745ed93c0024648f33dc1d553e9fdcc"></a>
    475<h2 class="memtitle"><span class="permalink"><a href="#ab745ed93c0024648f33dc1d553e9fdcc">&#9670;&nbsp;</a></span>strncmp()</h2>
    476
    477<div class="memitem">
    478<div class="memproto">
    479      <table class="memname">
    480        <tr>
    481          <td class="memname">int strncmp </td>
    482          <td>(</td>
    483          <td class="paramtype">const char *&#160;</td>
    484          <td class="paramname"><em>s1</em>, </td>
    485        </tr>
    486        <tr>
    487          <td class="paramkey"></td>
    488          <td></td>
    489          <td class="paramtype">const char *&#160;</td>
    490          <td class="paramname"><em>s2</em>, </td>
    491        </tr>
    492        <tr>
    493          <td class="paramkey"></td>
    494          <td></td>
    495          <td class="paramtype">int&#160;</td>
    496          <td class="paramname"><em>n</em>&#160;</td>
    497        </tr>
    498        <tr>
    499          <td></td>
    500          <td>)</td>
    501          <td></td><td></td>
    502        </tr>
    503      </table>
    504</div><div class="memdoc">
    505<p>Compare strings (at most <b>n</b> characters):</p>
    506<dl class="params"><dt>Parameters</dt><dd>
    507  <table class="params">
    508    <tr><td class="paramname">s1</td><td>First string to compare </td></tr>
    509    <tr><td class="paramname">s2</td><td>Second string to compare </td></tr>
    510    <tr><td class="paramname">n</td><td>Max number of characters to compare</td></tr>
    511  </table>
    512  </dd>
    513</dl>
    514<p>Returns zero if the strings are identical, or non-zero if they are not (see below).</p>
    515<p>Returns: </p><ul>
    516<li>&gt; 0 if <b>s1</b> &gt; <b>s2</b> (at first non-matching byte) </li>
    517<li>0 if <b>s1</b> == <b>s2</b> </li>
    518<li>&lt; 0 if <b>s1</b> &lt; <b>s2</b> (at first non-matching byte) </li>
    519</ul>
    520
    521</div>
    522</div>
    523<a id="a21ae87d60fcc456369668093c57db61f"></a>
    524<h2 class="memtitle"><span class="permalink"><a href="#a21ae87d60fcc456369668093c57db61f">&#9670;&nbsp;</a></span>strncpy()</h2>
    525
    526<div class="memitem">
    527<div class="memproto">
    528      <table class="memname">
    529        <tr>
    530          <td class="memname">char* strncpy </td>
    531          <td>(</td>
    532          <td class="paramtype">char *&#160;</td>
    533          <td class="paramname"><em>s1</em>, </td>
    534        </tr>
    535        <tr>
    536          <td class="paramkey"></td>
    537          <td></td>
    538          <td class="paramtype">const char *&#160;</td>
    539          <td class="paramname"><em>s2</em>, </td>
    540        </tr>
    541        <tr>
    542          <td class="paramkey"></td>
    543          <td></td>
    544          <td class="paramtype">int&#160;</td>
    545          <td class="paramname"><em>n</em>&#160;</td>
    546        </tr>
    547        <tr>
    548          <td></td>
    549          <td>)</td>
    550          <td></td><td></td>
    551        </tr>
    552      </table>
    553</div><div class="memdoc">
    554<p>Copy <b>n</b> characters from string <b>s2</b> to <b>s1</b></p>
    555<dl class="params"><dt>Parameters</dt><dd>
    556  <table class="params">
    557    <tr><td class="paramname">s1</td><td>String to copy into </td></tr>
    558    <tr><td class="paramname">s2</td><td>String to copy from </td></tr>
    559    <tr><td class="paramname">n</td><td>Max number of characters to copy from <b>s2</b></td></tr>
    560  </table>
    561  </dd>
    562</dl>
    563<p>If <b>s2</b> is shorter than <b>n</b>, the remaining bytes in <b>s1</b> are filled with \0.</p>
    564<p>Warning: If there is no \0 in the first <b>n</b> bytes of <b>s2</b> then <b>s1</b> will not be null terminated.</p>
    565<p>Returns: Pointer to <b>s1</b> </p>
    566
    567</div>
    568</div>
    569<a id="a52701f453c97403ec1b12d286484259b"></a>
    570<h2 class="memtitle"><span class="permalink"><a href="#a52701f453c97403ec1b12d286484259b">&#9670;&nbsp;</a></span>memcmp()</h2>
    571
    572<div class="memitem">
    573<div class="memproto">
    574      <table class="memname">
    575        <tr>
    576          <td class="memname">int memcmp </td>
    577          <td>(</td>
    578          <td class="paramtype">const void *&#160;</td>
    579          <td class="paramname"><em>buf1</em>, </td>
    580        </tr>
    581        <tr>
    582          <td class="paramkey"></td>
    583          <td></td>
    584          <td class="paramtype">const void *&#160;</td>
    585          <td class="paramname"><em>buf2</em>, </td>
    586        </tr>
    587        <tr>
    588          <td class="paramkey"></td>
    589          <td></td>
    590          <td class="paramtype"><a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
    591          <td class="paramname"><em>count</em>&#160;</td>
    592        </tr>
    593        <tr>
    594          <td></td>
    595          <td>)</td>
    596          <td></td><td></td>
    597        </tr>
    598      </table>
    599</div><div class="memdoc">
    600<p>Compare up to <b>count</b> bytes in buffers <b>buf1</b> and <b>buf2</b></p>
    601<dl class="params"><dt>Parameters</dt><dd>
    602  <table class="params">
    603    <tr><td class="paramname">buf1</td><td>Pointer to First buffer to compare </td></tr>
    604    <tr><td class="paramname">buf2</td><td>Pointer to Second buffer to compare </td></tr>
    605    <tr><td class="paramname">count</td><td>Max number of bytes to compare</td></tr>
    606  </table>
    607  </dd>
    608</dl>
    609<p>Returns zero if the buffers are identical, or non-zero if they are not (see below).</p>
    610<p>Returns: </p><ul>
    611<li>&gt; 0 if <b>buf1</b> &gt; <b>buf2</b> (at first non-matching byte) </li>
    612<li>0 if <b>buf1</b> == <b>buf2</b> </li>
    613<li>&lt; 0 if <b>buf1</b> &lt; <b>buf2</b> (at first non-matching byte) </li>
    614</ul>
    615
    616</div>
    617</div>
    618<h2 class="groupheader">Variable Documentation</h2>
    619<a id="a0b3366755f3276b0243c1e0497471b7a"></a>
    620<h2 class="memtitle"><span class="permalink"><a href="#a0b3366755f3276b0243c1e0497471b7a">&#9670;&nbsp;</a></span>c</h2>
    621
    622<div class="memitem">
    623<div class="memproto">
    624      <table class="memname">
    625        <tr>
    626          <td class="memname">void c</td>
    627        </tr>
    628      </table>
    629</div><div class="memdoc">
    630
    631</div>
    632</div>
    633</div><!-- contents -->
    634</div><!-- doc-content -->
    635<!-- HTML footer for doxygen 1.8.14-->
    636<!-- start footer part -->
    637<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
    638</div>
    639</body>
    640</html>