util/StringUtil: use CamelCase
This commit is contained in:
parent
6b75be183d
commit
e4c7e343c8
@ -56,7 +56,7 @@ archive_plugin_from_suffix(const char *suffix)
|
||||
|
||||
archive_plugins_for_each_enabled(plugin)
|
||||
if (plugin->suffixes != nullptr &&
|
||||
string_array_contains(plugin->suffixes, suffix))
|
||||
StringArrayContainsCase(plugin->suffixes, suffix))
|
||||
return plugin;
|
||||
|
||||
return nullptr;
|
||||
|
@ -26,12 +26,12 @@ get_bool(const char *value, bool *value_r)
|
||||
static const char *const t[] = { "yes", "true", "1", nullptr };
|
||||
static const char *const f[] = { "no", "false", "0", nullptr };
|
||||
|
||||
if (string_array_contains(t, value)) {
|
||||
if (StringArrayContainsCase(t, value)) {
|
||||
*value_r = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (string_array_contains(f, value)) {
|
||||
if (StringArrayContainsCase(f, value)) {
|
||||
*value_r = false;
|
||||
return true;
|
||||
}
|
||||
|
@ -31,8 +31,8 @@ DecoderPlugin::SupportsSuffix(const char *suffix) const
|
||||
assert(suffix != nullptr);
|
||||
#endif
|
||||
|
||||
return suffixes != nullptr && string_array_contains(suffixes, suffix);
|
||||
|
||||
return suffixes != nullptr &&
|
||||
StringArrayContainsCase(suffixes, suffix);
|
||||
}
|
||||
|
||||
bool
|
||||
@ -44,5 +44,5 @@ DecoderPlugin::SupportsMimeType(const char *mime_type) const
|
||||
#endif
|
||||
|
||||
return mime_types != nullptr &&
|
||||
string_array_contains(mime_types, mime_type);
|
||||
StringArrayContainsCase(mime_types, mime_type);
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ playlist_list_open_uri_scheme(const char *uri, Mutex &mutex, Cond &cond,
|
||||
|
||||
if (playlist_plugins_enabled[i] && plugin->open_uri != nullptr &&
|
||||
plugin->schemes != nullptr &&
|
||||
string_array_contains(plugin->schemes, scheme.c_str())) {
|
||||
StringArrayContainsCase(plugin->schemes, scheme.c_str())) {
|
||||
playlist = playlist_plugin_open_uri(plugin, uri,
|
||||
mutex, cond);
|
||||
if (playlist != nullptr)
|
||||
@ -151,7 +151,7 @@ playlist_list_open_uri_suffix(const char *uri, Mutex &mutex, Cond &cond,
|
||||
|
||||
if (playlist_plugins_enabled[i] && !tried[i] &&
|
||||
plugin->open_uri != nullptr && plugin->suffixes != nullptr &&
|
||||
string_array_contains(plugin->suffixes, suffix)) {
|
||||
StringArrayContainsCase(plugin->suffixes, suffix)) {
|
||||
playlist = playlist_plugin_open_uri(plugin, uri,
|
||||
mutex, cond);
|
||||
if (playlist != nullptr)
|
||||
@ -189,7 +189,7 @@ playlist_list_open_stream_mime2(InputStreamPtr &&is, const char *mime)
|
||||
playlist_plugins_for_each_enabled(plugin) {
|
||||
if (plugin->open_stream != nullptr &&
|
||||
plugin->mime_types != nullptr &&
|
||||
string_array_contains(plugin->mime_types, mime)) {
|
||||
StringArrayContainsCase(plugin->mime_types, mime)) {
|
||||
/* rewind the stream, so each plugin gets a
|
||||
fresh start */
|
||||
is->Rewind(IgnoreError());
|
||||
@ -230,7 +230,7 @@ playlist_list_open_stream_suffix(InputStreamPtr &&is, const char *suffix)
|
||||
playlist_plugins_for_each_enabled(plugin) {
|
||||
if (plugin->open_stream != nullptr &&
|
||||
plugin->suffixes != nullptr &&
|
||||
string_array_contains(plugin->suffixes, suffix)) {
|
||||
StringArrayContainsCase(plugin->suffixes, suffix)) {
|
||||
/* rewind the stream, so each plugin gets a
|
||||
fresh start */
|
||||
is->Rewind(IgnoreError());
|
||||
@ -279,7 +279,7 @@ playlist_suffix_supported(const char *suffix)
|
||||
|
||||
playlist_plugins_for_each_enabled(plugin) {
|
||||
if (plugin->suffixes != nullptr &&
|
||||
string_array_contains(plugin->suffixes, suffix))
|
||||
StringArrayContainsCase(plugin->suffixes, suffix))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ Strip(char *p)
|
||||
}
|
||||
|
||||
bool
|
||||
string_array_contains(const char *const* haystack, const char *needle)
|
||||
StringArrayContainsCase(const char *const*haystack, const char *needle)
|
||||
{
|
||||
assert(haystack != nullptr);
|
||||
assert(needle != nullptr);
|
||||
|
@ -104,7 +104,7 @@ Strip(char *p);
|
||||
*/
|
||||
gcc_pure
|
||||
bool
|
||||
string_array_contains(const char *const* haystack, const char *needle);
|
||||
StringArrayContainsCase(const char *const*haystack, const char *needle);
|
||||
|
||||
/**
|
||||
* Convert the specified ASCII string (0x00..0x7f) to upper case.
|
||||
|
Loading…
Reference in New Issue
Block a user