Skip to content

Commit

Permalink
Update API on the README
Browse files Browse the repository at this point in the history
  • Loading branch information
vmg committed Apr 17, 2013
1 parent daec468 commit e6f0ec9
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions README.md
Expand Up @@ -37,11 +37,23 @@ UTF-8 strings. If you are using another encoding, you should probably transcode
Do you really need docs for this?

~~~~ c
extern void houdini_escape_html(struct buf *ob, const char *src, size_t size);
extern void houdini_unescape_html(struct buf *ob, const char *src, size_t size);
extern void houdini_escape_uri(struct buf *ob, const char *src, size_t size);
extern void houdini_escape_url(struct buf *ob, const char *src, size_t size);
extern void houdini_unescape_uri(struct buf *ob, const char *src, size_t size);
extern void houdini_unescape_url(struct buf *ob, const char *src, size_t size);
int houdini_escape_html(gh_buf *ob, const uint8_t *src, size_t size);
int houdini_escape_html0(gh_buf *ob, const uint8_t *src, size_t size, int secure);
int houdini_unescape_html(gh_buf *ob, const uint8_t *src, size_t size);
int houdini_escape_xml(gh_buf *ob, const uint8_t *src, size_t size);
int houdini_escape_uri(gh_buf *ob, const uint8_t *src, size_t size);
int houdini_escape_url(gh_buf *ob, const uint8_t *src, size_t size);
int houdini_escape_href(gh_buf *ob, const uint8_t *src, size_t size);
int houdini_unescape_uri(gh_buf *ob, const uint8_t *src, size_t size);
int houdini_unescape_url(gh_buf *ob, const uint8_t *src, size_t size);
int houdini_escape_js(gh_buf *ob, const uint8_t *src, size_t size);
int houdini_unescape_js(gh_buf *ob, const uint8_t *src, size_t size);
~~~~
Pass your string. It'll get escaped/unescaped in the target buffer, and the call will return 1.
If the given string has nothing to escape/unescape, the call will return 0 and the
output buffer will be empty.
### Questions?
Open an issue. Or shout angrily at me on Twitter ([@vmg](https://twitter.com/vmg)).

0 comments on commit e6f0ec9

Please sign in to comment.