cscg22-gearboy

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

asm_2z80_2string_8h.html (26827B)


      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/z80/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_2z80_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>  </div>
     91  <div class="headertitle">
     92<div class="title">string.h File Reference</div>  </div>
     93</div><!--header-->
     94<div class="contents">
     95<div class="textblock"><code>#include &lt;<a class="el" href="asm_2z80_2types_8h_source.html">types.h</a>&gt;</code><br />
     96</div>
     97<p><a href="asm_2z80_2string_8h_source.html">Go to the source code of this file.</a></p>
     98<table class="memberdecls">
     99<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
    100Functions</h2></td></tr>
    101<tr class="memitem:af5b1fe1ca3f2aca8ad215962460d15a6"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2z80_2string_8h.html#af5b1fe1ca3f2aca8ad215962460d15a6">strcpy</a> (char *dest, const char *src) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
    102<tr class="separator:af5b1fe1ca3f2aca8ad215962460d15a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
    103<tr class="memitem:a11bd144d7d44914099a3aeddf1c8567d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2z80_2string_8h.html#a11bd144d7d44914099a3aeddf1c8567d">strcmp</a> (const char *s1, const char *s2)</td></tr>
    104<tr class="separator:a11bd144d7d44914099a3aeddf1c8567d"><td class="memSeparator" colspan="2">&#160;</td></tr>
    105<tr class="memitem:abec66c0a707472b9090ea4cd0402d648"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2z80_2string_8h.html#abec66c0a707472b9090ea4cd0402d648">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></td></tr>
    106<tr class="separator:abec66c0a707472b9090ea4cd0402d648"><td class="memSeparator" colspan="2">&#160;</td></tr>
    107<tr class="memitem:a854ba725a4e429439ccf93b1f5ad7b3a"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2z80_2string_8h.html#a854ba725a4e429439ccf93b1f5ad7b3a">memmove</a> (void *dest, const void *src, <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></td></tr>
    108<tr class="separator:a854ba725a4e429439ccf93b1f5ad7b3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
    109<tr class="memitem:a6491121b0087a8848354d9de3aa2444b"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2z80_2string_8h.html#a6491121b0087a8848354d9de3aa2444b">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_2z80_2types_8h.html#aa19670cfef9fe1cc31f28fafb0e1000a">Z88DK_CALLEE</a></td></tr>
    110<tr class="separator:a6491121b0087a8848354d9de3aa2444b"><td class="memSeparator" colspan="2">&#160;</td></tr>
    111<tr class="memitem:a81863156a28fd2eefeee6859d768bdb1"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2z80_2string_8h.html#a81863156a28fd2eefeee6859d768bdb1">reverse</a> (char *s) <a class="el" href="asm_2types_8h.html#a7ed081d8dfb6902784b2fc730bbb7f96">NONBANKED</a></td></tr>
    112<tr class="separator:a81863156a28fd2eefeee6859d768bdb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
    113<tr class="memitem:a13c88f5a8475fd7de5d81553cb29724a"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2z80_2string_8h.html#a13c88f5a8475fd7de5d81553cb29724a">strcat</a> (char *s1, const char *s2) <a class="el" href="asm_2types_8h.html#a7ed081d8dfb6902784b2fc730bbb7f96">NONBANKED</a></td></tr>
    114<tr class="separator:a13c88f5a8475fd7de5d81553cb29724a"><td class="memSeparator" colspan="2">&#160;</td></tr>
    115<tr class="memitem:ac952c3ccec84a458a4d385c5273c1ca0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2z80_2string_8h.html#ac952c3ccec84a458a4d385c5273c1ca0">strlen</a> (const char *s) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
    116<tr class="separator:ac952c3ccec84a458a4d385c5273c1ca0"><td class="memSeparator" colspan="2">&#160;</td></tr>
    117<tr class="memitem:a168580a0ddcb7fe754a711309966c99d"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2z80_2string_8h.html#a168580a0ddcb7fe754a711309966c99d">strncat</a> (char *s1, const char *s2, int n) <a class="el" href="asm_2types_8h.html#a7ed081d8dfb6902784b2fc730bbb7f96">NONBANKED</a></td></tr>
    118<tr class="separator:a168580a0ddcb7fe754a711309966c99d"><td class="memSeparator" colspan="2">&#160;</td></tr>
    119<tr class="memitem:a861dba2d93de82f087707bb795f5c602"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2z80_2string_8h.html#a861dba2d93de82f087707bb795f5c602">strncmp</a> (const char *s1, const char *s2, int n) <a class="el" href="asm_2types_8h.html#a7ed081d8dfb6902784b2fc730bbb7f96">NONBANKED</a></td></tr>
    120<tr class="separator:a861dba2d93de82f087707bb795f5c602"><td class="memSeparator" colspan="2">&#160;</td></tr>
    121<tr class="memitem:a796a9459c4f362e51c00307044c40ed5"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2z80_2string_8h.html#a796a9459c4f362e51c00307044c40ed5">strncpy</a> (char *s1, const char *s2, int n) <a class="el" href="asm_2types_8h.html#a7ed081d8dfb6902784b2fc730bbb7f96">NONBANKED</a></td></tr>
    122<tr class="separator:a796a9459c4f362e51c00307044c40ed5"><td class="memSeparator" colspan="2">&#160;</td></tr>
    123<tr class="memitem:add78645dba711c548ab16d056fb83b7e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asm_2z80_2string_8h.html#add78645dba711c548ab16d056fb83b7e">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_2z80_2types_8h.html#aa19670cfef9fe1cc31f28fafb0e1000a">Z88DK_CALLEE</a></td></tr>
    124<tr class="separator:add78645dba711c548ab16d056fb83b7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
    125</table>
    126<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
    127<div class="textblock"><p>Generic string functions. </p>
    128</div><h2 class="groupheader">Function Documentation</h2>
    129<a id="af5b1fe1ca3f2aca8ad215962460d15a6"></a>
    130<h2 class="memtitle"><span class="permalink"><a href="#af5b1fe1ca3f2aca8ad215962460d15a6">&#9670;&nbsp;</a></span>strcpy()</h2>
    131
    132<div class="memitem">
    133<div class="memproto">
    134      <table class="memname">
    135        <tr>
    136          <td class="memname">char* strcpy </td>
    137          <td>(</td>
    138          <td class="paramtype">char *&#160;</td>
    139          <td class="paramname"><em>dest</em>, </td>
    140        </tr>
    141        <tr>
    142          <td class="paramkey"></td>
    143          <td></td>
    144          <td class="paramtype">const char *&#160;</td>
    145          <td class="paramname"><em>src</em>&#160;</td>
    146        </tr>
    147        <tr>
    148          <td></td>
    149          <td>)</td>
    150          <td></td><td></td>
    151        </tr>
    152      </table>
    153</div><div class="memdoc">
    154<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>
    155<p>The strings may not overlap, and the destination string dest must be large enough to receive the copy.</p>
    156<dl class="params"><dt>Parameters</dt><dd>
    157  <table class="params">
    158    <tr><td class="paramname">dest</td><td>Array to copy into </td></tr>
    159    <tr><td class="paramname">src</td><td>Array to copy from</td></tr>
    160  </table>
    161  </dd>
    162</dl>
    163<dl class="section return"><dt>Returns</dt><dd>A pointer to dest </dd></dl>
    164
    165</div>
    166</div>
    167<a id="a11bd144d7d44914099a3aeddf1c8567d"></a>
    168<h2 class="memtitle"><span class="permalink"><a href="#a11bd144d7d44914099a3aeddf1c8567d">&#9670;&nbsp;</a></span>strcmp()</h2>
    169
    170<div class="memitem">
    171<div class="memproto">
    172      <table class="memname">
    173        <tr>
    174          <td class="memname">int strcmp </td>
    175          <td>(</td>
    176          <td class="paramtype">const char *&#160;</td>
    177          <td class="paramname"><em>s1</em>, </td>
    178        </tr>
    179        <tr>
    180          <td class="paramkey"></td>
    181          <td></td>
    182          <td class="paramtype">const char *&#160;</td>
    183          <td class="paramname"><em>s2</em>&#160;</td>
    184        </tr>
    185        <tr>
    186          <td></td>
    187          <td>)</td>
    188          <td></td><td></td>
    189        </tr>
    190      </table>
    191</div><div class="memdoc">
    192<p>Compares strings</p>
    193<dl class="params"><dt>Parameters</dt><dd>
    194  <table class="params">
    195    <tr><td class="paramname">s1</td><td>First string to compare </td></tr>
    196    <tr><td class="paramname">s2</td><td>Second string to compare</td></tr>
    197  </table>
    198  </dd>
    199</dl>
    200<p>Returns: </p><ul>
    201<li>&gt; 0 if <b>s1</b> &gt; <b>s2</b> </li>
    202<li>0 if <b>s1</b> == <b>s2</b> </li>
    203<li>&lt; 0 if <b>s1</b> &lt; <b>s2</b> </li>
    204</ul>
    205
    206</div>
    207</div>
    208<a id="abec66c0a707472b9090ea4cd0402d648"></a>
    209<h2 class="memtitle"><span class="permalink"><a href="#abec66c0a707472b9090ea4cd0402d648">&#9670;&nbsp;</a></span>memcpy()</h2>
    210
    211<div class="memitem">
    212<div class="memproto">
    213      <table class="memname">
    214        <tr>
    215          <td class="memname">void* memcpy </td>
    216          <td>(</td>
    217          <td class="paramtype">void *&#160;</td>
    218          <td class="paramname"><em>dest</em>, </td>
    219        </tr>
    220        <tr>
    221          <td class="paramkey"></td>
    222          <td></td>
    223          <td class="paramtype">const void *&#160;</td>
    224          <td class="paramname"><em>src</em>, </td>
    225        </tr>
    226        <tr>
    227          <td class="paramkey"></td>
    228          <td></td>
    229          <td class="paramtype"><a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
    230          <td class="paramname"><em>len</em>&#160;</td>
    231        </tr>
    232        <tr>
    233          <td></td>
    234          <td>)</td>
    235          <td></td><td></td>
    236        </tr>
    237      </table>
    238</div><div class="memdoc">
    239<p>Copies n bytes from memory area src to memory area dest.</p>
    240<p>The memory areas may not overlap.</p>
    241<dl class="params"><dt>Parameters</dt><dd>
    242  <table class="params">
    243    <tr><td class="paramname">dest</td><td>Buffer to copy into </td></tr>
    244    <tr><td class="paramname">src</td><td>Buffer to copy from </td></tr>
    245    <tr><td class="paramname">len</td><td>Number of Bytes to copy </td></tr>
    246  </table>
    247  </dd>
    248</dl>
    249
    250</div>
    251</div>
    252<a id="a854ba725a4e429439ccf93b1f5ad7b3a"></a>
    253<h2 class="memtitle"><span class="permalink"><a href="#a854ba725a4e429439ccf93b1f5ad7b3a">&#9670;&nbsp;</a></span>memmove()</h2>
    254
    255<div class="memitem">
    256<div class="memproto">
    257      <table class="memname">
    258        <tr>
    259          <td class="memname">void* memmove </td>
    260          <td>(</td>
    261          <td class="paramtype">void *&#160;</td>
    262          <td class="paramname"><em>dest</em>, </td>
    263        </tr>
    264        <tr>
    265          <td class="paramkey"></td>
    266          <td></td>
    267          <td class="paramtype">const void *&#160;</td>
    268          <td class="paramname"><em>src</em>, </td>
    269        </tr>
    270        <tr>
    271          <td class="paramkey"></td>
    272          <td></td>
    273          <td class="paramtype"><a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
    274          <td class="paramname"><em>n</em>&#160;</td>
    275        </tr>
    276        <tr>
    277          <td></td>
    278          <td>)</td>
    279          <td></td><td></td>
    280        </tr>
    281      </table>
    282</div><div class="memdoc">
    283<p>Copies n bytes from memory area src to memory area dest, areas may overlap </p>
    284
    285</div>
    286</div>
    287<a id="a6491121b0087a8848354d9de3aa2444b"></a>
    288<h2 class="memtitle"><span class="permalink"><a href="#a6491121b0087a8848354d9de3aa2444b">&#9670;&nbsp;</a></span>memset()</h2>
    289
    290<div class="memitem">
    291<div class="memproto">
    292      <table class="memname">
    293        <tr>
    294          <td class="memname">void* memset </td>
    295          <td>(</td>
    296          <td class="paramtype">void *&#160;</td>
    297          <td class="paramname"><em>s</em>, </td>
    298        </tr>
    299        <tr>
    300          <td class="paramkey"></td>
    301          <td></td>
    302          <td class="paramtype">int&#160;</td>
    303          <td class="paramname"><em>c</em>, </td>
    304        </tr>
    305        <tr>
    306          <td class="paramkey"></td>
    307          <td></td>
    308          <td class="paramtype"><a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
    309          <td class="paramname"><em>n</em>&#160;</td>
    310        </tr>
    311        <tr>
    312          <td></td>
    313          <td>)</td>
    314          <td></td><td></td>
    315        </tr>
    316      </table>
    317</div><div class="memdoc">
    318<p>Fills the memory region <b>s</b> with <b>n</b> bytes using value <b>c</b></p>
    319<dl class="params"><dt>Parameters</dt><dd>
    320  <table class="params">
    321    <tr><td class="paramname">s</td><td>Buffer to fill </td></tr>
    322    <tr><td class="paramname">c</td><td>char value to fill with (truncated from int) </td></tr>
    323    <tr><td class="paramname">n</td><td>Number of bytes to fill </td></tr>
    324  </table>
    325  </dd>
    326</dl>
    327
    328</div>
    329</div>
    330<a id="a81863156a28fd2eefeee6859d768bdb1"></a>
    331<h2 class="memtitle"><span class="permalink"><a href="#a81863156a28fd2eefeee6859d768bdb1">&#9670;&nbsp;</a></span>reverse()</h2>
    332
    333<div class="memitem">
    334<div class="memproto">
    335      <table class="memname">
    336        <tr>
    337          <td class="memname">char* reverse </td>
    338          <td>(</td>
    339          <td class="paramtype">char *&#160;</td>
    340          <td class="paramname"><em>s</em></td><td>)</td>
    341          <td></td>
    342        </tr>
    343      </table>
    344</div><div class="memdoc">
    345<p>Reverses the characters in a string</p>
    346<dl class="params"><dt>Parameters</dt><dd>
    347  <table class="params">
    348    <tr><td class="paramname">s</td><td>Pointer to string to reverse.</td></tr>
    349  </table>
    350  </dd>
    351</dl>
    352<p>For example 'abcdefg' will become 'gfedcba'.</p>
    353<p>Banked as the string must be modifiable.</p>
    354<p>Returns: Pointer to <b>s</b> </p>
    355
    356</div>
    357</div>
    358<a id="a13c88f5a8475fd7de5d81553cb29724a"></a>
    359<h2 class="memtitle"><span class="permalink"><a href="#a13c88f5a8475fd7de5d81553cb29724a">&#9670;&nbsp;</a></span>strcat()</h2>
    360
    361<div class="memitem">
    362<div class="memproto">
    363      <table class="memname">
    364        <tr>
    365          <td class="memname">char* strcat </td>
    366          <td>(</td>
    367          <td class="paramtype">char *&#160;</td>
    368          <td class="paramname"><em>s1</em>, </td>
    369        </tr>
    370        <tr>
    371          <td class="paramkey"></td>
    372          <td></td>
    373          <td class="paramtype">const char *&#160;</td>
    374          <td class="paramname"><em>s2</em>&#160;</td>
    375        </tr>
    376        <tr>
    377          <td></td>
    378          <td>)</td>
    379          <td></td><td></td>
    380        </tr>
    381      </table>
    382</div><div class="memdoc">
    383<p>Concatenate Strings. Appends string <b>s2</b> to the end of string <b>s1</b></p>
    384<dl class="params"><dt>Parameters</dt><dd>
    385  <table class="params">
    386    <tr><td class="paramname">s1</td><td>String to append onto </td></tr>
    387    <tr><td class="paramname">s2</td><td>String to copy from</td></tr>
    388  </table>
    389  </dd>
    390</dl>
    391<p>For example 'abc' and 'def' will become 'abcdef'.</p>
    392<p>String <b>s1</b> must be large enough to store both <b>s1</b> and <b>s2</b>.</p>
    393<p>Returns: Pointer to <b>s1</b> </p>
    394
    395</div>
    396</div>
    397<a id="ac952c3ccec84a458a4d385c5273c1ca0"></a>
    398<h2 class="memtitle"><span class="permalink"><a href="#ac952c3ccec84a458a4d385c5273c1ca0">&#9670;&nbsp;</a></span>strlen()</h2>
    399
    400<div class="memitem">
    401<div class="memproto">
    402      <table class="memname">
    403        <tr>
    404          <td class="memname">int strlen </td>
    405          <td>(</td>
    406          <td class="paramtype">const char *&#160;</td>
    407          <td class="paramname"><em>s</em></td><td>)</td>
    408          <td></td>
    409        </tr>
    410      </table>
    411</div><div class="memdoc">
    412<p>Calculates the length of a string</p>
    413<dl class="params"><dt>Parameters</dt><dd>
    414  <table class="params">
    415    <tr><td class="paramname">s</td><td>String to calculate length of</td></tr>
    416  </table>
    417  </dd>
    418</dl>
    419<p>Returns: Length of string not including the terminating &lsquo;\0&rsquo; character. </p>
    420
    421</div>
    422</div>
    423<a id="a168580a0ddcb7fe754a711309966c99d"></a>
    424<h2 class="memtitle"><span class="permalink"><a href="#a168580a0ddcb7fe754a711309966c99d">&#9670;&nbsp;</a></span>strncat()</h2>
    425
    426<div class="memitem">
    427<div class="memproto">
    428      <table class="memname">
    429        <tr>
    430          <td class="memname">char* strncat </td>
    431          <td>(</td>
    432          <td class="paramtype">char *&#160;</td>
    433          <td class="paramname"><em>s1</em>, </td>
    434        </tr>
    435        <tr>
    436          <td class="paramkey"></td>
    437          <td></td>
    438          <td class="paramtype">const char *&#160;</td>
    439          <td class="paramname"><em>s2</em>, </td>
    440        </tr>
    441        <tr>
    442          <td class="paramkey"></td>
    443          <td></td>
    444          <td class="paramtype">int&#160;</td>
    445          <td class="paramname"><em>n</em>&#160;</td>
    446        </tr>
    447        <tr>
    448          <td></td>
    449          <td>)</td>
    450          <td></td><td></td>
    451        </tr>
    452      </table>
    453</div><div class="memdoc">
    454<p>Concatenate at most <b>n</b> characters from string <b>s2</b> onto the end of <b>s1</b>.</p>
    455<dl class="params"><dt>Parameters</dt><dd>
    456  <table class="params">
    457    <tr><td class="paramname">s1</td><td>String to append onto </td></tr>
    458    <tr><td class="paramname">s2</td><td>String to copy from </td></tr>
    459    <tr><td class="paramname">n</td><td>Max number of characters to copy from <b>s2</b></td></tr>
    460  </table>
    461  </dd>
    462</dl>
    463<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>
    464<p>Returns: Pointer to <b>s1</b> </p>
    465
    466</div>
    467</div>
    468<a id="a861dba2d93de82f087707bb795f5c602"></a>
    469<h2 class="memtitle"><span class="permalink"><a href="#a861dba2d93de82f087707bb795f5c602">&#9670;&nbsp;</a></span>strncmp()</h2>
    470
    471<div class="memitem">
    472<div class="memproto">
    473      <table class="memname">
    474        <tr>
    475          <td class="memname">int strncmp </td>
    476          <td>(</td>
    477          <td class="paramtype">const char *&#160;</td>
    478          <td class="paramname"><em>s1</em>, </td>
    479        </tr>
    480        <tr>
    481          <td class="paramkey"></td>
    482          <td></td>
    483          <td class="paramtype">const char *&#160;</td>
    484          <td class="paramname"><em>s2</em>, </td>
    485        </tr>
    486        <tr>
    487          <td class="paramkey"></td>
    488          <td></td>
    489          <td class="paramtype">int&#160;</td>
    490          <td class="paramname"><em>n</em>&#160;</td>
    491        </tr>
    492        <tr>
    493          <td></td>
    494          <td>)</td>
    495          <td></td><td></td>
    496        </tr>
    497      </table>
    498</div><div class="memdoc">
    499<p>Compare strings (at most n characters):</p>
    500<dl class="params"><dt>Parameters</dt><dd>
    501  <table class="params">
    502    <tr><td class="paramname">s1</td><td>First string to compare </td></tr>
    503    <tr><td class="paramname">s2</td><td>Second string to compare </td></tr>
    504    <tr><td class="paramname">n</td><td>Max number of characters to compare</td></tr>
    505  </table>
    506  </dd>
    507</dl>
    508<p>Returns: </p><ul>
    509<li>&gt; 0 if <b>s1</b> &gt; <b>s2</b> </li>
    510<li>0 if <b>s1</b> == <b>s2</b> </li>
    511<li>&lt; 0 if <b>s1</b> &lt; <b>s2</b> </li>
    512</ul>
    513
    514</div>
    515</div>
    516<a id="a796a9459c4f362e51c00307044c40ed5"></a>
    517<h2 class="memtitle"><span class="permalink"><a href="#a796a9459c4f362e51c00307044c40ed5">&#9670;&nbsp;</a></span>strncpy()</h2>
    518
    519<div class="memitem">
    520<div class="memproto">
    521      <table class="memname">
    522        <tr>
    523          <td class="memname">char* strncpy </td>
    524          <td>(</td>
    525          <td class="paramtype">char *&#160;</td>
    526          <td class="paramname"><em>s1</em>, </td>
    527        </tr>
    528        <tr>
    529          <td class="paramkey"></td>
    530          <td></td>
    531          <td class="paramtype">const char *&#160;</td>
    532          <td class="paramname"><em>s2</em>, </td>
    533        </tr>
    534        <tr>
    535          <td class="paramkey"></td>
    536          <td></td>
    537          <td class="paramtype">int&#160;</td>
    538          <td class="paramname"><em>n</em>&#160;</td>
    539        </tr>
    540        <tr>
    541          <td></td>
    542          <td>)</td>
    543          <td></td><td></td>
    544        </tr>
    545      </table>
    546</div><div class="memdoc">
    547<p>Copy <b>n</b> characters from string <b>s2</b> to <b>s1</b></p>
    548<dl class="params"><dt>Parameters</dt><dd>
    549  <table class="params">
    550    <tr><td class="paramname">s1</td><td>String to copy into </td></tr>
    551    <tr><td class="paramname">s2</td><td>String to copy from </td></tr>
    552    <tr><td class="paramname">n</td><td>Max number of characters to copy from <b>s2</b></td></tr>
    553  </table>
    554  </dd>
    555</dl>
    556<p>If <b>s2</b> is shorter than <b>n</b>, the remaining bytes in <b>s1</b> are filled with \0.</p>
    557<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>
    558<p>Returns: Pointer to <b>s1</b> </p>
    559
    560</div>
    561</div>
    562<a id="add78645dba711c548ab16d056fb83b7e"></a>
    563<h2 class="memtitle"><span class="permalink"><a href="#add78645dba711c548ab16d056fb83b7e">&#9670;&nbsp;</a></span>memcmp()</h2>
    564
    565<div class="memitem">
    566<div class="memproto">
    567      <table class="memname">
    568        <tr>
    569          <td class="memname">int memcmp </td>
    570          <td>(</td>
    571          <td class="paramtype">const void *&#160;</td>
    572          <td class="paramname"><em>buf1</em>, </td>
    573        </tr>
    574        <tr>
    575          <td class="paramkey"></td>
    576          <td></td>
    577          <td class="paramtype">const void *&#160;</td>
    578          <td class="paramname"><em>buf2</em>, </td>
    579        </tr>
    580        <tr>
    581          <td class="paramkey"></td>
    582          <td></td>
    583          <td class="paramtype"><a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
    584          <td class="paramname"><em>count</em>&#160;</td>
    585        </tr>
    586        <tr>
    587          <td></td>
    588          <td>)</td>
    589          <td></td><td></td>
    590        </tr>
    591      </table>
    592</div><div class="memdoc">
    593<p>Compares buffers</p>
    594<dl class="params"><dt>Parameters</dt><dd>
    595  <table class="params">
    596    <tr><td class="paramname">buf1</td><td>First buffer to compare </td></tr>
    597    <tr><td class="paramname">buf2</td><td>Second buffer to compare </td></tr>
    598    <tr><td class="paramname">count</td><td>Buffer length</td></tr>
    599  </table>
    600  </dd>
    601</dl>
    602<p>Returns: </p><ul>
    603<li>&gt; 0 if <b>buf1</b> &gt; <b>buf2</b> </li>
    604<li>0 if <b>buf1</b> == <b>buf2</b> </li>
    605<li>&lt; 0 if <b>buf1</b> &lt; <b>buf2</b> </li>
    606</ul>
    607
    608</div>
    609</div>
    610</div><!-- contents -->
    611</div><!-- doc-content -->
    612<!-- HTML footer for doxygen 1.8.14-->
    613<!-- start footer part -->
    614<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
    615</div>
    616</body>
    617</html>