xref: /haiku/src/add-ons/kernel/file_systems/websearchfs/string_utils.h (revision a127b88ecbfab58f64944c98aa47722a18e363b2)
1 /*
2  * Copyright 2004-2008, François Revol, <revol@free.fr>.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _STRING_UTILS_H
6 #define _STRING_UTILS_H
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 /* converts a string to a format suitable for use in urls
13  * ex: "foo bar+" -> "foo+bar%2D"
14  * caller must free() result
15  */
16 extern char *urlify_string(const char *str);
17 
18 /* converts string with html entities to regular utf-8 string
19  * ex: "Fran&ccedil;ois" -> "François"
20  * caller must free() result
21  */
22 extern char *unentitify_string(const char *str);
23 
24 #ifdef __cplusplus
25 }
26 #endif
27 
28 #endif /* _STRING_UTILS_H */
29