#include <stdlib.h>
#include <glib.h>
Go to the source code of this file.
Functions | |
G_BEGIN_DECLS gchar * | str_append (gchar *str, const gchar *add_str) |
gchar * | str_replace (gchar *str, gchar *new_str) |
void | str_replace_in (gchar **str, gchar *new_str) |
gboolean | str_has_prefix_nocase (const gchar *str, const gchar *prefix) |
gboolean | str_has_suffix_nocase (const gchar *str, const gchar *suffix) |
gboolean | str_has_suffixes_nocase (const gchar *str, gchar *const *suffixes) |
gchar * | str_assert_utf8 (const gchar *str) |
This function can be used to assert that a given string is valid UTF-8. | |
void | str_set_utf8_impl (gchar *(*stu_impl)(const gchar *), gchar *(*stuf_impl)(const gchar *, gssize, gsize *, gsize *, GError **)) |
gchar * | str_to_utf8 (const gchar *str) |
Convert given string from nearly any encoding to UTF-8 encoding. | |
gchar * | str_to_utf8_full (const gchar *str, gssize len, gsize *bytes_read, gsize *bytes_written, GError **err) |
const gchar * | str_skip_chars (const gchar *str, const gchar *chars) |
gchar * | convert_dos_path (gchar *text) |
gchar * | filename_get_subtune (const gchar *filename, gint *track) |
Checks if given URI contains a subtune indicator/number. | |
gchar * | filename_split_subtune (const gchar *filename, gint *track) |
Given file path/URI contains ending indicating subtune number "?<number>", splits the string into filename without subtune value. | |
void | string_replace_char (gchar *string, gchar old_str, gchar new_str) |
void | string_decode_percent (gchar *string) |
gchar * | string_encode_percent (const gchar *string, gboolean is_filename) |
gboolean | uri_is_utf8 (const gchar *uri, gboolean warn) |
gchar * | uri_to_utf8 (const gchar *uri) |
void | uri_check_utf8 (gchar **uri, gboolean warn) |
gchar * | filename_to_uri (const gchar *filename) |
gchar * | uri_to_filename (const gchar *uri) |
gchar * | uri_to_display (const gchar *uri) |
gchar * | uri_get_extension (const gchar *uri) |
void | string_cut_extension (gchar *string) |
gint | string_compare (const gchar *a, const gchar *b) |
gint | string_compare_encoded (const gchar *a, const gchar *b) |
const void * | memfind (const void *mem, gint size, const void *token, gint length) |
gchar * | str_replace_fragment (gchar *s, gint size, const gchar *old_str, const gchar *new_str) |
void | string_canonize_case (gchar *string) |
gboolean | string_to_int (const gchar *string, gint *addr) |
gboolean | string_to_double (const gchar *string, gdouble *addr) |
gchar * | int_to_string (gint val) |
gchar * | double_to_string (gdouble val) |
gboolean | string_to_double_array (const gchar *string, gdouble *array, gint count) |
gchar * | double_array_to_string (const gdouble *array, gint count) |
gchar* convert_dos_path | ( | gchar * | text | ) |
Definition at line 201 of file audstrings.c.
Referenced by construct_uri().
gchar* double_array_to_string | ( | const gdouble * | array, | |
gint | count | |||
) |
Definition at line 848 of file audstrings.c.
Referenced by eq_set_bands().
gchar* double_to_string | ( | gdouble | val | ) |
Definition at line 799 of file audstrings.c.
Referenced by double_array_to_string(), and set_double().
gchar* filename_get_subtune | ( | const gchar * | filename, | |
gint * | track | |||
) |
Checks if given URI contains a subtune indicator/number.
If it does, track is set to to it, and position of subtune separator in the URI string is returned.
filename | Filename/URI to split. | |
track | Pointer to variable where subtune number should be assigned or NULL if it is not needed. |
Definition at line 227 of file audstrings.c.
Referenced by filename_split_subtune().
gchar* filename_split_subtune | ( | const gchar * | filename, | |
gint * | track | |||
) |
Given file path/URI contains ending indicating subtune number "?<number>", splits the string into filename without subtune value.
If given track pointer is non-NULL, subtune number is assigned into it.
filename | Filename/URI to split. | |
track | Pointer to variable where subtune number should be assigned or NULL if it is not needed. |
Definition at line 258 of file audstrings.c.
Referenced by file_find_decoder(), file_read_image(), file_read_tuple(), file_write_tuple(), and playback_thread().
gchar* filename_to_uri | ( | const gchar * | filename | ) |
Definition at line 444 of file audstrings.c.
Referenced by add_folder(), convert_filenames(), load_playlists_real(), save_playlists_real(), and uri_to_utf8().
gchar* int_to_string | ( | gint | val | ) |
Definition at line 793 of file audstrings.c.
Referenced by set_int().
Definition at line 629 of file audstrings.c.
G_BEGIN_DECLS gchar* str_append | ( | gchar * | str, | |
const gchar * | add_str | |||
) |
Definition at line 65 of file audstrings.c.
gchar* str_assert_utf8 | ( | const gchar * | str | ) |
This function can be used to assert that a given string is valid UTF-8.
If it is, a copy of the string is returned. However, if the string is NOT valid UTF-8, a warning and a callstack backtrace is printed in order to see where the problem occured.
This is a temporary measure for removing useless str_to_utf8 etc. calls and will be eventually removed. This function should be used in place of str_to_utf8() calls when it can be reasonably assumed that the input should already be in unicode encoding.
str | String to be tested and converted to UTF-8 encoding. |
Definition at line 161 of file audstrings.c.
gboolean str_has_prefix_nocase | ( | const gchar * | str, | |
const gchar * | prefix | |||
) |
Definition at line 84 of file audstrings.c.
gboolean str_has_suffix_nocase | ( | const gchar * | str, | |
const gchar * | suffix | |||
) |
Definition at line 90 of file audstrings.c.
Referenced by scan_plugin_func(), and str_has_suffixes_nocase().
gboolean str_has_suffixes_nocase | ( | const gchar * | str, | |
gchar *const * | suffixes | |||
) |
Definition at line 97 of file audstrings.c.
gchar* str_replace | ( | gchar * | str, | |
gchar * | new_str | |||
) |
Definition at line 71 of file audstrings.c.
Referenced by str_append(), and str_replace_in().
gchar* str_replace_fragment | ( | gchar * | s, | |
gint | size, | |||
const gchar * | old_str, | |||
const gchar * | new_str | |||
) |
Definition at line 655 of file audstrings.c.
void str_replace_in | ( | gchar ** | str, | |
gchar * | new_str | |||
) |
Definition at line 78 of file audstrings.c.
void str_set_utf8_impl | ( | gchar *(*)(const gchar *) | stu_impl, | |
gchar *(*)(const gchar *, gssize, gsize *, gsize *, GError **) | stuf_impl | |||
) |
Definition at line 115 of file audstrings.c.
Referenced by chardet_init().
const gchar* str_skip_chars | ( | const gchar * | str, | |
const gchar * | chars | |||
) |
Definition at line 193 of file audstrings.c.
gchar* str_to_utf8 | ( | const gchar * | str | ) |
Convert given string from nearly any encoding to UTF-8 encoding.
str | Local filename/path to convert. |
Definition at line 129 of file audstrings.c.
Referenced by str_assert_utf8(), tuple_associate_string(), tuple_associate_string_rel(), and uri_to_display().
gchar* str_to_utf8_full | ( | const gchar * | str, | |
gssize | len, | |||
gsize * | bytes_read, | |||
gsize * | bytes_written, | |||
GError ** | err | |||
) |
Definition at line 135 of file audstrings.c.
void string_canonize_case | ( | gchar * | string | ) |
Definition at line 688 of file audstrings.c.
Referenced by tuple_new_unlocked().
gint string_compare | ( | const gchar * | a, | |
const gchar * | b | |||
) |
Definition at line 538 of file audstrings.c.
Referenced by add_folder(), plugin_compare(), and tuple_compare_string().
gint string_compare_encoded | ( | const gchar * | a, | |
const gchar * | b | |||
) |
Definition at line 582 of file audstrings.c.
Referenced by filename_compare_basename().
void string_cut_extension | ( | gchar * | string | ) |
Definition at line 526 of file audstrings.c.
Referenced by tuple_formatter_make_title_string().
void string_decode_percent | ( | gchar * | string | ) |
Definition at line 312 of file audstrings.c.
gchar* string_encode_percent | ( | const gchar * | string, | |
gboolean | is_filename | |||
) |
Definition at line 341 of file audstrings.c.
Referenced by filename_to_uri().
void string_replace_char | ( | gchar * | string, | |
gchar | old_str, | |||
gchar | new_str | |||
) |
Definition at line 274 of file audstrings.c.
Referenced by convert_dos_path(), filename_to_uri(), normalize_path(), uri_to_display(), and uri_to_filename().
gboolean string_to_double | ( | const gchar * | string, | |
gdouble * | addr | |||
) |
Definition at line 739 of file audstrings.c.
Referenced by get_double(), and string_to_double_array().
Definition at line 828 of file audstrings.c.
Referenced by eq_get_bands().
Definition at line 712 of file audstrings.c.
Referenced by get_int(), and string_to_double().
void uri_check_utf8 | ( | gchar ** | uri, | |
gboolean | warn | |||
) |
Definition at line 430 of file audstrings.c.
Referenced by playlist_entry_insert_batch_raw().
gchar* uri_get_extension | ( | const gchar * | uri | ) |
Definition at line 507 of file audstrings.c.
Definition at line 378 of file audstrings.c.
Referenced by playlist_rescan_file(), and uri_check_utf8().
gchar* uri_to_display | ( | const gchar * | uri | ) |
Definition at line 487 of file audstrings.c.
Referenced by describe_song(), and tuple_set_filename().
gchar* uri_to_filename | ( | const gchar * | uri | ) |
Definition at line 465 of file audstrings.c.
Referenced by add_folder(), get_associated_image_file(), vfs_file_test(), and vfs_is_writeable().
gchar* uri_to_utf8 | ( | const gchar * | uri | ) |
Definition at line 413 of file audstrings.c.
Referenced by playlist_rescan_file(), and uri_check_utf8().