Baigudin Software avatar
Baigudin Software logo
home
ru region
en region

Class «library::Memory»

Class of static methods to manipulate memory.

  • library::Memory

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

Copies a block of memory.

Parameters:
dst — pointer to the destination array where the content is to be copied,type-casted to a pointer of type void*.
src — pointer to the source of data to be copied, type-casted to a pointer of type const void*.
len — number of bytes to copy.

Returns:
destination is returned.

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

Fills a block of memory.

Parameters:
dst — pointer to the destination block of memory to fill.
val — value to be set. The value is passed as an int, but the function fills the block of memory using the unsigned char conversion of this value.
len — Number of bytes to be set to the value.

Returns:
destination is returned.

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

Concatenates strings.

Parameters:
dst — pointer to the destination array, which should contain a C string, and be large enough to contain the concatenated resulting string.
src — C-string to be appended. This should not overlap destination.

Returns:
destination is returned.

public: static int32 strcmp(const char* str1, const char* str2);

Compares two strings.

Parameters:
str1 — C-string to be compared.
str2 — C-string to be compared.

Returns:
a value indicating the relationship between the strings.

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

Copies a string.

Parameters:
dst — pointer to the destination array where the content is to be copied.
src — C-string to be copied.

Returns:
destination is returned.

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

Gets a string length.

Parameters:
str — pointer to C-string.

Returns:
the length of string.

Back to class list