2016-05-05 11:49:05 +02:00
|
|
|
#ifndef _STRING_H
|
|
|
|
#define _STRING_H 1
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
//---
|
|
|
|
// Memory manipulation.
|
|
|
|
//---
|
|
|
|
|
|
|
|
/*
|
2016-07-25 09:04:22 +02:00
|
|
|
memcpy() O(byte_number)
|
2016-05-05 11:49:05 +02:00
|
|
|
Copies a memory area. The two areas must not overlap (if they do, use
|
|
|
|
memmove()). A smart copy is performed when possible. To enhance
|
|
|
|
performance, make sure than destination and source are both 4-aligned.
|
|
|
|
*/
|
|
|
|
void *memcpy(void *destination, const void *source, size_t byte_number);
|
|
|
|
|
|
|
|
/*
|
2016-07-25 09:04:22 +02:00
|
|
|
memset() O(byte_number)
|
2016-05-05 11:49:05 +02:00
|
|
|
Sets the contents of a memory area. A smart copy is performed.
|
|
|
|
*/
|
|
|
|
void *memset(void *destination, int byte, size_t byte_number);
|
|
|
|
|
2016-07-25 09:04:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
//---
|
|
|
|
// String manipulation.
|
|
|
|
//---
|
|
|
|
|
|
|
|
/*
|
|
|
|
strlen() O(length)
|
|
|
|
Returns the length of a string.
|
|
|
|
*/
|
|
|
|
size_t strlen(const char *str);
|
|
|
|
|
2016-05-05 11:49:05 +02:00
|
|
|
#endif // _STRING_H
|