kernel.runtime.util



char[] itoa(char[] buf, char base, long d);
This function converts an integer to a string, depending on the base passed in.

Params:
char[] buf The function will save the translated string into this character array.
char base The base of the integer value. If "d," it will be assumed to be decimal. If "x," the integer will be hexadecimal.
long d The integer to translate.

Returns:
The translated string in a character array.

void* memcpy(void* dest, void* src, size_t count);
This function copies data from a source piece of memory to a destination piece of memory.

Params:
void* dest A pointer to the piece of memory serving as the copy destination.
void* src A pointer to the piece of memory serving as the copy source.
size_t count The number of bytes to copy form src to dest.

Returns:
A void pointer to the start of the destination data (dest).

void* memmove(void* dest, void* src, size_t count);
Memcpy and memmove only really have differences at the user level, where they have slightly different semantics. Here, they're the same.

int memcmp(void* a, void* b, size_t n);
Compare two blocks of memory.

Params:
void* a Pointer to the first block.
void* b Pointer to the second block.
size_t n The number of bytes to compare.

Returns:
0 if they are equal, < 0 if a is less than b, and > 0 if a is greater than b.

void memset(void* addr, int val, uint numBytes);
This function sets a particular piece of memory to a particular value.

Params:
void* addr The address of the piece of memory you wish to write.
int val The value you wish to write to memory.
uint numBytes The number of bytes you would like to write to memory.

size_t strlen(char* s);
This function determines the size of a passed-in string.

Params:
char* s A pointer to the beginning of a character array, declaring a string.

Returns:
The size of the string in size_t format.

char[] toString(char* s);
This function takes in a character pointer and returns a character array, or a string.

Params:
char* s A pointer to the character(s) you wish to translate to a string.

Returns:
A character array (string) containing the information.

int isnan(real e);
This function checks to see if a floating point number is a NaN.

Params:
real e The value / piece of information you would like to check for number status.

Returns:
0 if it isn't a NaN, non-zero if it is.


Page generated by Ddoc.