diff options
author | Max Kellermann <max@duempel.org> | 2013-11-28 18:48:35 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-11-28 18:48:35 +0100 |
commit | af4133e3c92c78cc19ff14b876be6afcab1db091 (patch) | |
tree | da38387995bde630b20f81a717862ae21d19bb48 /src/ls.cxx | |
parent | a788b7e747bc21b9aadee45dd028fa6198af794e (diff) | |
download | mpd-af4133e3c92c78cc19ff14b876be6afcab1db091.tar.gz mpd-af4133e3c92c78cc19ff14b876be6afcab1db091.tar.xz mpd-af4133e3c92c78cc19ff14b876be6afcab1db091.zip |
Util/StringUtil: add StringStartsWith()
Replaces GLib's g_str_has_prefix().
Diffstat (limited to '')
-rw-r--r-- | src/ls.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ls.cxx b/src/ls.cxx index ec8ce6fbe..117c8875b 100644 --- a/src/ls.cxx +++ b/src/ls.cxx @@ -19,11 +19,10 @@ #include "config.h" #include "ls.hxx" +#include "util/StringUtil.hxx" #include "util/UriUtil.hxx" #include "Client.hxx" -#include <glib.h> - #include <assert.h> /** @@ -90,7 +89,7 @@ bool uri_supported_scheme(const char *uri) assert(uri_has_scheme(uri)); while (*urlPrefixes) { - if (g_str_has_prefix(uri, *urlPrefixes)) + if (StringStartsWith(uri, *urlPrefixes)) return true; urlPrefixes++; } |