src/fmt.c
/** \brief Hex decode string.
 *
 * The string contents are not checked, so decoding can fail if size succeeds.
 */
\brief Hex decode string.
The string contents are not checked, so decoding can fail if size succeeds.
\ brief Hex decode string . The string contents are not checked so decoding can fail if size succeeds .
ssize_t str_dec_b16_n(char ** dst, size_t * cap, StrRef ref)
{
    ssize_t size = str_decode_b16_size(ref.len);
    if((size >= 0) && (*cap > (size_t)size))
    {
        if(str_decode_b16(*dst, ref))
        {
            *dst += size;
            *cap -= size;
            return size;
        }
        else
        {
            size = -1;
        }
    }
    str_rst_dst(dst, cap); 
    return size;
}
ssize_t str_dec_b16_n ( char * * dst , size_t * cap , StrRef ref ) { ssize_t size = str_decode_b16_size ( ref . len ) ; if ( ( size >= 0 ) && ( * cap > ( size_t ) size ) ) { if ( str_decode_b16 ( * dst , ref ) ) { * dst += size ; * cap -= size ; return size ; } else { size = -1 ; } } str_rst_dst ( dst , cap ) ; return size ; }
\brief Hex decode string.
\ brief Hex decode string .
// decoding error or dst too small