mirror of
https://github.com/xomboverlord/xomb-docs.git
synced 2026-01-11 02:06:37 +01:00
117 lines
4.2 KiB
HTML
117 lines
4.2 KiB
HTML
<html><head>
|
|
<META http-equiv="content-type" content="text/html; charset=utf-8">
|
|
<title>kernel.runtime.util</title>
|
|
</head><body>
|
|
<h1>kernel.runtime.util</h1>
|
|
<!-- Generated by Ddoc from ../kernel/runtime/util.d -->
|
|
<br><br>
|
|
<dl><dt><big>char[] <u>itoa</u>(char[] <i>buf</i>, char <i>base</i>, long <i>d</i>);
|
|
</big></dt>
|
|
<dd>This function converts an integer to a string, depending on the <i>base</i> passed in.
|
|
<br><br>
|
|
<b>Params:</b><br>
|
|
<table><tr><td>char[] <i>buf</i></td>
|
|
<td>The function will save the translated string into this character array.</td></tr>
|
|
<tr><td>char <i>base</i></td>
|
|
<td>The <i>base</i> of the integer value. If "<i>d</i>," it will be assumed to be decimal. If "x," the integer
|
|
will be hexadecimal.</td></tr>
|
|
<tr><td>long <i>d</i></td>
|
|
<td>The integer to translate.</td></tr>
|
|
</table><br>
|
|
<b>Returns:</b><br>
|
|
The translated string in a character array.<br><br>
|
|
|
|
</dd>
|
|
<dt><big>void* <u>memcpy</u>(void* <i>dest</i>, void* <i>src</i>, size_t <i>count</i>);
|
|
</big></dt>
|
|
<dd>This function copies data from a source piece of memory to a destination piece of memory.
|
|
<br><br>
|
|
<b>Params:</b><br>
|
|
<table><tr><td>void* <i>dest</i></td>
|
|
<td>A pointer to the piece of memory serving as the copy destination.</td></tr>
|
|
<tr><td>void* <i>src</i></td>
|
|
<td>A pointer to the piece of memory serving as the copy source.</td></tr>
|
|
<tr><td>size_t <i>count</i></td>
|
|
<td>The number of bytes to copy form <i>src</i> to <i>dest</i>.</td></tr>
|
|
</table><br>
|
|
<b>Returns:</b><br>
|
|
A void pointer to the start of the destination data (<i>dest</i>).<br><br>
|
|
|
|
</dd>
|
|
<dt><big>void* <u>memmove</u>(void* <i>dest</i>, void* <i>src</i>, size_t <i>count</i>);
|
|
</big></dt>
|
|
<dd>Memcpy and <u>memmove</u> only really have differences at the user level, where they have slightly
|
|
different semantics. Here, they're the same.<br><br>
|
|
|
|
</dd>
|
|
<dt><big>int <u>memcmp</u>(void* <i>a</i>, void* <i>b</i>, size_t <i>n</i>);
|
|
</big></dt>
|
|
<dd>Compare two blocks of memory.
|
|
<br><br>
|
|
<b>Params:</b><br>
|
|
<table><tr><td>void* <i>a</i></td>
|
|
<td>Pointer to the first block.</td></tr>
|
|
<tr><td>void* <i>b</i></td>
|
|
<td>Pointer to the second block.</td></tr>
|
|
<tr><td>size_t <i>n</i></td>
|
|
<td>The number of bytes to compare.</td></tr>
|
|
</table><br>
|
|
<b>Returns:</b><br>
|
|
0 if they are equal, < 0 if <i>a</i> is less than <i>b</i>, and > 0 if <i>a</i> is greater than <i>b</i>.<br><br>
|
|
|
|
</dd>
|
|
<dt><big>void <u>memset</u>(void* <i>addr</i>, int <i>val</i>, uint <i>numBytes</i>);
|
|
</big></dt>
|
|
<dd>This function sets a particular piece of memory to a particular value.
|
|
<br><br>
|
|
<b>Params:</b><br>
|
|
<table><tr><td>void* <i>addr</i></td>
|
|
<td>The address of the piece of memory you wish to write.</td></tr>
|
|
<tr><td>int <i>val</i></td>
|
|
<td>The value you wish to write to memory.</td></tr>
|
|
<tr><td>uint <i>numBytes</i></td>
|
|
<td>The number of bytes you would like to write to memory.</td></tr>
|
|
</table><br>
|
|
|
|
</dd>
|
|
<dt><big>size_t <u>strlen</u>(char* <i>s</i>);
|
|
</big></dt>
|
|
<dd>This function determines the size of a passed-in string.
|
|
<br><br>
|
|
<b>Params:</b><br>
|
|
<table><tr><td>char* <i>s</i></td>
|
|
<td>A pointer to the beginning of a character array, declaring a string.</td></tr>
|
|
</table><br>
|
|
<b>Returns:</b><br>
|
|
The size of the string in size_t format.<br><br>
|
|
|
|
</dd>
|
|
<dt><big>char[] <u>toString</u>(char* <i>s</i>);
|
|
</big></dt>
|
|
<dd>This function takes in a character pointer and returns a character array, or a string.
|
|
<br><br>
|
|
<b>Params:</b><br>
|
|
<table><tr><td>char* <i>s</i></td>
|
|
<td>A pointer to the character(<i>s</i>) you wish to translate to a string.</td></tr>
|
|
</table><br>
|
|
<b>Returns:</b><br>
|
|
A character array (string) containing the information.<br><br>
|
|
|
|
</dd>
|
|
<dt><big>int <u>isnan</u>(real <i>e</i>);
|
|
</big></dt>
|
|
<dd>This function checks to see if a floating point number is a NaN.
|
|
<br><br>
|
|
<b>Params:</b><br>
|
|
<table><tr><td>real <i>e</i></td>
|
|
<td>The value / piece of information you would like to check for number status.</td></tr>
|
|
</table><br>
|
|
<b>Returns:</b><br>
|
|
0 if it isn't a NaN, non-zero if it is.<br><br>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
<hr><small>Page generated by <a href="http://www.digitalmars.com/d/1.0/ddoc.html">Ddoc</a>. </small>
|
|
</body></html>
|