st-sgml-ref

st-sgml-ref — functions for expanding SGML character references.

Synopsis




char*       st_sgml_ref_expand              (const char *str);
char*       st_sgml_ref_expand_len          (const char *str,
                                             int len);

Description

Details

st_sgml_ref_expand ()

char*       st_sgml_ref_expand              (const char *str);

Parses str, expanding its SGML character references and XHTML character entities. See st_sgml_ref_expand_len().

str : the nul-terminated string to parse.
Returns : the expansion of str. The string should be freed when no longer needed.

st_sgml_ref_expand_len ()

char*       st_sgml_ref_expand_len          (const char *str,
                                             int len);

Parses str, expanding its SGML character references and XHTML character entities.

Numerical SGML character references as well as XHTML entities are supported. Unsupported entities will be inserted verbatim into the result.

str : the string to parse.
len : the length of str, or -1 if str is nul-terminated.
Returns : the expansion of str. The string should be freed when no longer needed.