LMMS
Loading...
Searching...
No Matches
string.c File Reference
#include "serd_internal.h"
#include <math.h>

Functions

SERD_API const uint8_tserd_strerror (SerdStatus st)
 Return a string describing a status code.
SERD_API size_t serd_strlen (const uint8_t *str, size_t *n_bytes, SerdNodeFlags *flags)
static double read_sign (const char **sptr)
SERD_API double serd_strtod (const char *str, char **endptr)
static uint8_t unmap (const uint8_t in)
static size_t decode_chunk (const uint8_t in[4], uint8_t out[3])
SERD_API voidserd_base64_decode (const uint8_t *str, size_t len, size_t *size)

Variables

static const char b64_unmap []

Function Documentation

◆ decode_chunk()

size_t decode_chunk ( const uint8_t in[4],
uint8_t out[3] )
inlinestatic

Decode 4 base64 characters to 3 raw bytes.

◆ read_sign()

double read_sign ( const char ** sptr)
inlinestatic

◆ unmap()

uint8_t unmap ( const uint8_t in)
inlinestatic

Variable Documentation

◆ b64_unmap

const char b64_unmap[]
static
Initial value:
=
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$m$$$ncdefghijkl$$$$$$"
"$/0123456789:;<=>?@ABCDEFGH$$$$$$IJKLMNOPQRSTUVWXYZ[\\]^_`ab$$$$"
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"

Base64 decoding table. This is indexed by encoded characters and returns the numeric value used for decoding, shifted up by 47 to be in the range of printable ASCII. A '$' is a placeholder for characters not in the base64 alphabet.