Apriltag WASM Detector
Apriltag detector using the apriltag C library and compiled to WASM using emscripten.
|
Simple json strings creation. More...
#include <string.h>
#include <malloc.h>
#include <assert.h>
#include <stdio.h>
#include <stdarg.h>
#include "str_json.h"
Functions | |
int | str_json_create (t_str_json *str_json, size_t size_bytes) |
Init a string. More... | |
int | str_json_destroy (t_str_json *str_json) |
Free a string. More... | |
void | str_json_clear (t_str_json *str_json) |
Clear a string. More... | |
size_t | str_json_concat (t_str_json *str_json_dest, const char *source_c_str) |
Copy the content of source_c_str to str_json_dest. More... | |
size_t | str_json_printf (t_str_json *str_json_dest, const char *format,...) |
Composes a string with the same text that would be printed if format was used on printf,. More... | |
Simple json strings creation.
void str_json_clear | ( | t_str_json * | str_json | ) |
Clear a string.
Clear a string.
str_json | t_str_json structure of the string to clear |
Clear a string.
size_t str_json_concat | ( | t_str_json * | str_json_dest, |
const char * | source_c_str | ||
) |
Copy the content of source_c_str to str_json_dest.
Copy the content of source_c_str to str_json_dest.
Copies up to the terminating null-character, or no more space in dest A terminating null character is always appended to dest.str. IMPORTANT: dest is assumed to be null-terminated
str_json_dest | the destination t_str_json structure with the destination string info |
source_c_str | a null-terminated c string (char *) to the source string |
Copy the content of source_c_str to str_json_dest.
int str_json_create | ( | t_str_json * | str_json, |
size_t | size_bytes | ||
) |
Init a string.
Init a string.
str_json | t_str_json structure to hold the string info |
size_bytes | size of the string to allocate |
Init a string.
int str_json_destroy | ( | t_str_json * | str_json | ) |
Free a string.
Free a string.
str_json | t_str_json structure with the string info |
Free a string.
size_t str_json_printf | ( | t_str_json * | str_json_dest, |
const char * | format, | ||
... | |||
) |
Composes a string with the same text that would be printed if format was used on printf,.
Composes a string with the same text that would be printed if format was used on printf,.
str_json_dest | the destination t_str_json structure with the destination string info |
format | a format string |
... | additional arguments |
Composes a string with the same text that would be printed if format was used on printf,.