GitOS
Operating system exercise
|
Functions | |
size_t | strlen (const char *str) |
Determine the length of a string. | |
size_t | strnlen (const char *str, size_t max_len) |
Determine the length of a fixed-size string. | |
char * | strrev (char *str) |
Reverses string. | |
char * | strcpy (char *dest, const char *src) |
Copies string. | |
char * | strncpy (char *dest, const char *src, size_t n) |
Copies string with maximum length. | |
int | strncmp (const char *str1, const char *str2, size_t n) |
Compares two strings with maximum length. | |
int | strcmp (const char *str1, const char *str2) |
Compares two strings. | |
char | tolower (char c) |
Converts ASCII letter to lowercase. | |
int | istrncmp (const char *str1, const char *str2, size_t n) |
size_t | strnlen_terminator (const char *str, size_t max, char terminator) |
Calculates string length with custom terminator. | |
char * | itoa (long num, char *str, int base) |
Converts signed number to string. | |
char * | uitoa (unsigned long num, char *str, int base) |
Converts unsigned number to string. | |
char * | vsprintf (char *buf, const char *fmt, va_list args) |
Kernel vsprintf params: %% c s p l(mod) d i x. | |
char * | sprintf (char *buf, const char *fmt,...) |
Kernel sprintf params: %% c s p l(mod) d i x. | |
int | is_digit (char c) |
Determines if given char is an ASCII digit. | |
int | to_numeric_digit (char c) |
Converts ASCII digit to numeric. | |
void * | memset (void *ptr, int c, size_t size) |
Sets first bytes of memory pointed to specified value. | |
void * | memcpy (void *dstptr, const void *srcptr, size_t size) |
Copies memory from one place to another. | |
int | memcmp (void *ptr1, void *ptr2, size_t len) |
Compares the first num bytes of the block of memory pointed by ptr1 to the first num bytes pointed by ptr2. | |
int is_digit | ( | char | c | ) |
Determines if given char is an ASCII digit.
c | Character to test |
int istrncmp | ( | const char * | str1, |
const char * | str2, | ||
size_t | n | ||
) |
References tolower().
char * itoa | ( | long | num, |
char * | str, | ||
int | base | ||
) |
int memcmp | ( | void * | ptr1, |
void * | ptr2, | ||
size_t | len | ||
) |
Compares the first num bytes of the block of memory pointed by ptr1 to the first num bytes pointed by ptr2.
ptr1 | Pointer to block of memory |
ptr2 | Pointer to block of memory |
len | Number of bytes to compare |
void * memcpy | ( | void * | dstptr, |
const void * | srcptr, | ||
size_t | size | ||
) |
Copies memory from one place to another.
dstptr | Destination pointer |
srcptr | Source pointer |
size | Length of copied memory |
References size.
void * memset | ( | void * | ptr, |
int | c, | ||
size_t | size | ||
) |
Sets first bytes of memory pointed to specified value.
ptr | Pointer to the block of memory to fill |
c | Value to be set |
size | Number of bytes to set |
References size.
char * sprintf | ( | char * | buf, |
const char * | fmt, | ||
... | |||
) |
Kernel sprintf params: %% c s p l(mod) d i x.
buf | Buffer |
fmt | Text to format |
... | Args |
References vsprintf().
int strcmp | ( | const char * | str1, |
const char * | str2 | ||
) |
char * strcpy | ( | char * | dest, |
const char * | src | ||
) |
Copies string.
dest | Destination buffer |
src | Input buffer |
size_t strlen | ( | const char * | str | ) |
Determine the length of a string.
str | String |
int strncmp | ( | const char * | str1, |
const char * | str2, | ||
size_t | n | ||
) |
Compares two strings with maximum length.
str1 | String |
str2 | String |
n | Max length |
char * strncpy | ( | char * | dest, |
const char * | src, | ||
size_t | n | ||
) |
Copies string with maximum length.
dest | Destination buffer |
src | Input buffer |
n | Max length |
size_t strnlen | ( | const char * | str, |
size_t | max_len | ||
) |
Determine the length of a fixed-size string.
str | |
max_len |
size_t strnlen_terminator | ( | const char * | str, |
size_t | max, | ||
char | terminator | ||
) |
Calculates string length with custom terminator.
str | String to measure length |
max | Max length of string |
terminator | Custom terminator |
char * strrev | ( | char * | str | ) |
int to_numeric_digit | ( | char | c | ) |
Converts ASCII digit to numeric.
c | ASCII digit |
char tolower | ( | char | c | ) |
Converts ASCII letter to lowercase.
c | Input letter |
char * uitoa | ( | unsigned long | num, |
char * | str, | ||
int | base | ||
) |