# [literal.h] Literal Conversion

## contents

#include "standard.h"

## String to C-Literal

    c_string LIT_c_str_lit(c_string s)

converts string 's' to a C-Literal; allocs memory
( single byte character set or UTF-8 )

    c_string LIT_c_char_lit(char c)

converts character 'c' to a C-Literal; allocs memory
( single byte character set or UTF-8 )

## STYX-Literal to string

    int LIT_hex2_char(int h1, int h2)

constructs a single byte character from the hex values 'h1' and 'h2'

    int LIT_hex_val(int h, int p)

constructs a unicode character from up to 8 hex values;
has to be called for each hex value and the result added to get the final code
h = hex digit, p = position [ 0 .. 7 ]

    wc_string LIT_styx_lit_str(long *len, c_string s, c_bool* ucs4)

converts STYX literal 's' to a string; allocs memory
( 'ucs4' --> unicode character found in literal )