String and memory functions.
More...
|
See stdarg.h documentation for details.
|
|
typedef __builtin_va_list | va_list |
| |
|
#define | va_start(ap, v) __builtin_va_start(ap, v) |
| |
|
#define | va_arg(ap, type) __builtin_va_arg(ap, type) |
| |
|
#define | va_end(ap) __builtin_va_end(ap) |
| |
|
See string.h documention for details.
|
|
void * | memcpy (void *destination, const void *source, u32_t num) |
| |
|
char * | strcpy (char *destination, const char *source) |
| |
|
int | memcmp (const void *ptr1, const void *ptr2, u32_t num) |
| |
|
int | strcmp (const char *str1, const char *str2) |
| |
|
int | strncmp (const char *str1, const char *str2, u32_t num) |
| |
|
void * | memset (void *ptr, int value, u32_t num) |
| |
|
u32_t | strlen (const char *str) |
| |
|
See stdio.h documention for details.
|
| int | vsprintf (char *str, const char *fmt, va_list ap) |
| | Simple vsprintf.
|
| |
| int | sprintf (char *str, const char *format,...) |
| | Simple sprintf.
|
| |
|
| char * | memstr (char *haystack, int h_length, char *needle, int n_length) |
| | Search for a string in memory.
|
| |
| uidiv_result_t | uidiv (u32_t num, u32_t dem) |
| | Unsigned integer division.
|
| |
|
void | vita_init_log () |
| | Sets the logging function.
|
| |
| void | vita_logf (char *file, int line,...) |
| | Writes a log entry.
|
| |
String and memory functions.
Division result.
- See Also
- uidiv
| char* memstr |
( |
char * |
haystack, |
|
|
int |
h_length, |
|
|
char * |
needle, |
|
|
int |
n_length |
|
) |
| |
Search for a string in memory.
Uses the Boyer-Moore algorithm to search.
- Returns
- First occurrence of needle in haystack
- Parameters
-
| haystack | Where to search |
| h_length | Length of haystack |
| needle | String to find |
| n_length | Length of needle |
| int sprintf |
( |
char * |
str, |
|
|
const char * |
format, |
|
|
|
... |
|
) |
| |
Simple sprintf.
Only supports c, s, u, x, X with optional zero padding. Always returns zero.
Unsigned integer division.
ARM does not have native division support
- Returns
- Result of operation or zero if dividing by zero.
- Parameters
-
| num | Numerator |
| dem | Denominator |
| void vita_logf |
( |
char * |
file, |
|
|
int |
line, |
|
|
|
... |
|
) |
| |
Writes a log entry.
Writes log to all places set in options including log file, on screen, and console.
- Parameters
-
| file | Source file of code writing to log |
| line | Line number of code writing to log |
| int vsprintf |
( |
char * |
str, |
|
|
const char * |
fmt, |
|
|
va_list |
ap |
|
) |
| |
Simple vsprintf.
Only supports c, s, u, x, X with optional zero padding. Always returns zero.