51 *(dest_bytes++) = character;
68 *(dest_bytes++) = *(src_bytes++);
85 *(--dest_bytes) = *(--src_bytes);
120 diff = ( *(first_bytes++) - *(second_bytes++) );
138 for ( ;
len-- ; src_bytes++ ) {
139 if ( *src_bytes == character )
140 return ( (
void * ) src_bytes );
158 for ( ;
len-- ; first_bytes++, second_bytes++ ) {
160 *first_bytes = *second_bytes;
161 *second_bytes = temp;
191 for ( ;
max-- ; first_bytes++, second_bytes++ ) {
192 diff = ( *first_bytes - *second_bytes );
195 if ( ! *first_bytes )
226 for ( ;
max-- ; first_bytes++, second_bytes++ ) {
227 diff = (
toupper ( *first_bytes ) -
231 if ( ! *first_bytes )
259 while (
max-- && *(src_bytes++) )
274 for ( ; ; src_bytes++ ) {
275 if ( *src_bytes == character )
276 return ( (
char * ) src_bytes );
295 for ( src_bytes-- ; src_bytes >=
start ; src_bytes-- ) {
296 if ( *src_bytes == character )
297 return ( (
char * ) src_bytes );
309 char *
strstr (
const char *haystack,
const char *needle ) {
312 for ( ; *haystack ; haystack++ ) {
313 if (
memcmp ( haystack, needle,
len ) == 0 )
314 return ( (
char * ) haystack );
331 for ( ; ; src_bytes++, dest_bytes++ ) {
332 *dest_bytes = *src_bytes;
351 for ( ;
max ;
max--, src_bytes++, dest_bytes++ ) {
352 *dest_bytes = *src_bytes;
357 *(dest_bytes++) =
'\0';
415 if ( character >=
'a' )
416 return ( character - (
'a' - 10 ) );
417 if ( character >=
'A' )
418 return ( character - (
'A' - 10 ) );
419 if ( character <=
'9' )
420 return ( character -
'0' );
440 if ( *
string ==
'-' ) {
443 }
else if ( *
string ==
'+' ) {
450 if ( *
string ==
'0' ) {
453 if ( ( *
string & ~0x20 ) ==
'X' ) {
471 unsigned long strtoul (
const char *
string,
char **endp,
int base ) {
472 unsigned long value = 0;
480 for ( ; ;
string++ ) {
482 if ( digit >= (
unsigned int )
base )
493 *endp = ( (
char * )
string );
506 unsigned long long strtoull (
const char *
string,
char **endp,
int base ) {
507 unsigned long long value = 0;
515 for ( ; ;
string++ ) {
517 if ( digit >= (
unsigned int )
base )
528 *endp = ( (
char * )
string );
void * memswap(void *first, void *second, size_t len)
Swap memory regions.
unsigned long strtoul(const char *string, char **endp, int base)
Convert string to numeric value.
char * strrchr(const char *src, int character)
Find rightmost character within a string.
static __always_inline int off_t userptr_t second
static void const void * src
unsigned long long strtoull(const char *string, char **endp, int base)
Convert string to numeric value.
int strcasecmp(const char *first, const char *second)
Compare case-insensitive strings.
int strncasecmp(const char *first, const char *second, size_t max)
Compare case-insensitive strings.
void * generic_memcpy(void *dest, const void *src, size_t len)
Copy memory region (forwards)
unsigned int digit_value(unsigned int character)
Calculate digit value.
int strncmp(const char *first, const char *second, size_t max)
Compare strings.
static const void * base
Base address.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
void * memchr(const void *src, int character, size_t len)
Find character within a memory region.
uint32_t start
Starting offset.
static int toupper(int character)
Convert character to upper case.
char * strncpy(char *dest, const char *src, size_t max)
Copy string.
char * strstr(const char *haystack, const char *needle)
Find substring.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
char * strcpy(char *dest, const char *src)
Copy string.
pseudo_bit_t value[0x00020]
static const char * strtoul_pre(const char *string, int *negate, int *base)
Preprocess string for strtoul() or strtoull()
char * strchr(const char *src, int character)
Find character within a string.
void * generic_memcpy_reverse(void *dest, const void *src, size_t len)
Copy memory region (backwards)
char * strdup(const char *src)
Duplicate string.
int isspace(int character)
Check to see if character is a space.
size_t strlen(const char *src)
Get length of string.
size_t strnlen(const char *src, size_t max)
Get length of string.
void * malloc(size_t size)
Allocate memory.
int strcmp(const char *first, const char *second)
Compare strings.
void * generic_memmove(void *dest, const void *src, size_t len)
Copy (possibly overlapping) memory region.
char * strndup(const char *src, size_t max)
Duplicate string.
char * strcat(char *dest, const char *src)
Concatenate string.
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
#define NULL
NULL pointer (VOID *)
uint32_t first
Length to skip in first segment.
void * generic_memset(void *dest, int character, size_t len)
Fill memory region.