Audacious  $Id:Doxyfile42802007-03-2104:39:00Znenolod$
audstrings.h
Go to the documentation of this file.
00001 /*
00002  * audstrings.h
00003  * Copyright 2009-2011 John Lindgren
00004  * Copyright 2010 William Pitcock
00005  *
00006  * Redistribution and use in source and binary forms, with or without
00007  * modification, are permitted provided that the following conditions are met:
00008  *
00009  * 1. Redistributions of source code must retain the above copyright notice,
00010  *    this list of conditions, and the following disclaimer.
00011  *
00012  * 2. Redistributions in binary form must reproduce the above copyright notice,
00013  *    this list of conditions, and the following disclaimer in the documentation
00014  *    provided with the distribution.
00015  *
00016  * This software is provided "as is" and without any warranty, express or
00017  * implied. In no event shall the authors be liable for any damages arising from
00018  * the use of this software.
00019  */
00020 
00021 #ifndef LIBAUDCORE_STRINGS_H
00022 #define LIBAUDCORE_STRINGS_H
00023 
00024 #include <libaudcore/core.h>
00025 
00026 bool_t str_has_prefix_nocase(const char * str, const char * prefix);
00027 bool_t str_has_suffix_nocase(const char * str, const char * suffix);
00028 
00029 void str_set_utf8_impl (char * (* stu_impl) (const char *),
00030  char * (* stuf_impl) (const char *, int, int *, int *));
00031 char * str_to_utf8 (const char * str);
00032 char * str_to_utf8_full (const char * str, int len, int * bytes_read, int * bytes_written);
00033 
00034 void string_replace_char (char * string, char old_str, char new_str);
00035 
00036 void str_decode_percent (const char * str, int len, char * out);
00037 void str_encode_percent (const char * str, int len, char * out);
00038 
00039 char * filename_to_uri (const char * filename);
00040 char * uri_to_filename (const char * uri);
00041 char * uri_to_display (const char * uri);
00042 
00043 void uri_parse (const char * uri, const char * * base_p, const char * * ext_p,
00044  const char * * sub_p, int * isub_p);
00045 
00046 int string_compare (const char * a, const char * b);
00047 int string_compare_encoded (const char * a, const char * b);
00048 
00049 char *str_replace_fragment(char *s, int size, const char *old_str, const char *new_str);
00050 
00051 bool_t string_to_int (const char * string, int * addr);
00052 bool_t string_to_double (const char * string, double * addr);
00053 char * int_to_string (int val);
00054 char * double_to_string (double val);
00055 
00056 bool_t string_to_double_array (const char * string, double * array, int count);
00057 char * double_array_to_string (const double * array, int count);
00058 
00059 #endif /* LIBAUDCORE_STRINGS_H */