Baigudin Software avatar
EOOS Systems logo
home
ru region
en region

Class «eoos::lib::Memory»

Memory manipulator class.

  • eoos::lib::Memory

public: static T atoi(char_t const* str, Number::Base base = Number::BASE_10);

Converts a string to an integer number.

Parameters:
str — A character string that would be converted to a number.
base — A numerical base used to parse the string.

Returns:
The resulting number, 0 if an error is occurred.

public: static bool_t itoa(T val, char_t* str, Number::Base base = Number::BASE_10);

Converts an integer number to a string.

Parameters:
val — A value that would be converted to a string.
str — A character string for a result of the conversion.
base — A numerical base used to represent a value as a string.

Returns:
True if the conversion has been completed successfully.

public: static void* memcpy(void* dst, void const* src, size_t len);

Copies a block of memory.

Parameters:
dst — A destination array where the content would be copied.
src — A source array to be copied.
len — A number of bytes to copy.

Returns:
A pointer to the destination array, or NULLPTR if an error has been occurred.

public: static void* memset(void* dst, int32_t val, size_t len);

Fills a block of memory.

Parameters:
dst — A destination block of memory would be filled.
val — A value to be set.
len — A number of bytes to be set to the value.

Returns:
A pointer to the destination memory, or NULLPTR if an error has been occurred.

public: static char_t* strcat(char_t* dst, char_t const* src);

Concatenates two strings.

Parameters:
dst — A destination character string where the content would be appended.
src — A character string to be appended.

Returns:
A pointer to the destination string, or NULLPTR if an error has been occurred.

public: static int32_t strcmp(char_t const* str1, char_t const* str2);

Compares two strings.

Parameters:
str1 — Character string to be compared.
str2 — Character string to be compared.

Returns:
The value 0 if the string 1 is equal to the string 2; a value less than 0 if the first not match character of string 1 has lower value than in string 2; a value greater than 0 if the first not match character of string 1 has greater value than in string 2; or the minimum possible value if an error has been occurred.

public: static char_t* strcpy(char_t* dst, char_t const* src);

Copies one string to another .

Parameters:
dst — A destination array where the content would be copied.
src — A character string to be copied.

Returns:
A pointer to the destination string, or NULLPTR if an error has been occurred.

public: static size_t strlen(char_t const* str);

Returns the length of a passed string .

Parameters:
str — A character string would be measured.

Returns:
The length of the passed string, and zero if NULLPTR given.

Back to class list