LF OS
Hobby operating system for amd64 with high ambitions
Loading...
Searching...
No Matches
string.c File Reference

(7c4d7d1 userspace/term: change eyecandy inclusion to use objcopy instead of xxd)

#include <string.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
+ Include dependency graph for string.c:

Go to the source code of this file.

Functions

int strcmp (const char *a, const char *b)
 
char tolower (const char c)
 
int strcasecmp (const char *a, const char *b)
 
size_t strlen (const char *str)
 
char * strncpy (char *dest, const char *src, size_t n)
 
size_t wcslen (const wchar_t *str)
 
void memset32 (uint32_t *dest, uint32_t c, size_t size)
 
void * memset (void *dest, int c, size_t size)
 
void * memcpy (void *dest, void const *source, size_t size)
 
int memcmp (const void *a, const void *b, size_t n)
 
void * memmove (void *dest, const void *src, size_t n)
 
int sputs (char *buffer, int buffer_size, char *string, int length)
 
int sputls (char *buffer, int buffer_size, wchar_t *string, int length)
 
int sputui (char *buffer, int buffer_size, uint64_t number, int base)
 
int sputi (char *buffer, int buffer_size, int64_t number, int base)
 
int sputbytes (char *buffer, int buffer_size, int64_t number)
 
size_t kvsnprintf (char *buffer, size_t buffer_size, const char *format, va_list args)
 
size_t ksnprintf (char *buffer, size_t buffer_size, const char *format,...)
 

Function Documentation

◆ ksnprintf()

size_t ksnprintf ( char *  buffer,
size_t  buffer_size,
const char *  format,
  ... 
)

Definition at line 339 of file string.c.

References format, kvsnprintf(), va_end, and va_start.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ kvsnprintf()

size_t kvsnprintf ( char *  buffer,
size_t  buffer_size,
const char *  format,
va_list  args 
)

Definition at line 224 of file string.c.

References format, length, memset(), sputbytes(), sputi(), sputls(), sputs(), sputui(), strlen(), va_arg, and wcslen().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ memcmp()

int memcmp ( const void *  a,
const void *  b,
size_t  n 
)

Definition at line 91 of file string.c.

◆ memcpy()

void * memcpy ( void *  dest,
void const *  source,
size_t  size 
)

Definition at line 80 of file string.c.

+ Here is the caller graph for this function:

◆ memmove()

void * memmove ( void *  dest,
const void *  src,
size_t  n 
)

Definition at line 106 of file string.c.

+ Here is the caller graph for this function:

◆ memset()

void * memset ( void *  dest,
int  c,
size_t  size 
)

Definition at line 72 of file string.c.

+ Here is the caller graph for this function:

◆ memset32()

void memset32 ( uint32_t dest,
uint32_t  c,
size_t  size 
)

Definition at line 66 of file string.c.

References size.

+ Here is the caller graph for this function:

◆ sputbytes()

int sputbytes ( char *  buffer,
int  buffer_size,
int64_t  number 
)

Definition at line 190 of file string.c.

References sputi(), and strlen().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sputi()

int sputi ( char *  buffer,
int  buffer_size,
int64_t  number,
int  base 
)

Definition at line 163 of file string.c.

References base, size, and sputs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sputls()

int sputls ( char *  buffer,
int  buffer_size,
wchar_t string,
int  length 
)

Definition at line 133 of file string.c.

References length.

+ Here is the caller graph for this function:

◆ sputs()

int sputs ( char *  buffer,
int  buffer_size,
char *  string,
int  length 
)

Definition at line 121 of file string.c.

References length.

+ Here is the caller graph for this function:

◆ sputui()

int sputui ( char *  buffer,
int  buffer_size,
uint64_t  number,
int  base 
)

Definition at line 143 of file string.c.

References base, size, and sputs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ strcasecmp()

int strcasecmp ( const char *  a,
const char *  b 
)

Definition at line 21 of file string.c.

References tolower().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ strcmp()

int strcmp ( const char *  a,
const char *  b 
)

Definition at line 7 of file string.c.

+ Here is the caller graph for this function:

◆ strlen()

size_t strlen ( const char *  str)

Definition at line 30 of file string.c.

+ Here is the caller graph for this function:

◆ strncpy()

char * strncpy ( char *  dest,
const char *  src,
size_t  n 
)

Definition at line 42 of file string.c.

+ Here is the caller graph for this function:

◆ tolower()

char tolower ( const char  c)

Definition at line 13 of file string.c.

+ Here is the caller graph for this function:

◆ wcslen()

size_t wcslen ( const wchar_t str)

Definition at line 54 of file string.c.

+ Here is the caller graph for this function: