Audacious  $Id:Doxyfile42802007-03-2104:39:00Znenolod$
audstrings.h
Go to the documentation of this file.
1 /*
2  * audstrings.h
3  * Copyright 2009-2011 John Lindgren
4  * Copyright 2010 William Pitcock
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are met:
8  *
9  * 1. Redistributions of source code must retain the above copyright notice,
10  * this list of conditions, and the following disclaimer.
11  *
12  * 2. Redistributions in binary form must reproduce the above copyright notice,
13  * this list of conditions, and the following disclaimer in the documentation
14  * provided with the distribution.
15  *
16  * This software is provided "as is" and without any warranty, express or
17  * implied. In no event shall the authors be liable for any damages arising from
18  * the use of this software.
19  */
20 
21 #ifndef LIBAUDCORE_STRINGS_H
22 #define LIBAUDCORE_STRINGS_H
23 
24 #include <libaudcore/core.h>
25 
26 bool_t str_has_prefix_nocase(const char * str, const char * prefix);
27 bool_t str_has_suffix_nocase(const char * str, const char * suffix);
28 
29 void str_set_utf8_impl (char * (* stu_impl) (const char *),
30  char * (* stuf_impl) (const char *, int, int *, int *));
31 char * str_to_utf8 (const char * str);
32 char * str_to_utf8_full (const char * str, int len, int * bytes_read, int * bytes_written);
33 
34 void string_replace_char (char * string, char old_c, char new_c);
35 
36 void str_decode_percent (const char * str, int len, char * out);
37 void str_encode_percent (const char * str, int len, char * out);
38 
39 char * filename_to_uri (const char * filename);
40 char * uri_to_filename (const char * uri);
41 char * uri_to_display (const char * uri);
42 
43 void uri_parse (const char * uri, const char * * base_p, const char * * ext_p,
44  const char * * sub_p, int * isub_p);
45 bool_t uri_get_extension (const char * uri, char * buf, int buflen);
46 
47 int string_compare (const char * a, const char * b);
48 int string_compare_encoded (const char * a, const char * b);
49 
50 char *str_replace_fragment(char *s, int size, const char *old_str, const char *new_str);
51 
52 bool_t string_to_int (const char * string, int * addr);
53 bool_t string_to_double (const char * string, double * addr);
54 char * int_to_string (int val);
55 char * double_to_string (double val);
56 
57 bool_t string_to_double_array (const char * string, double * array, int count);
58 char * double_array_to_string (const double * array, int count);
59 
60 #endif /* LIBAUDCORE_STRINGS_H */