diff options
author | Max Kellermann <max@duempel.org> | 2014-11-01 12:45:47 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-11-01 12:45:47 +0100 |
commit | eab32f2e5d8114d08e392001f0004284267bebd5 (patch) | |
tree | 664d97672c8fc17d659064aef201030540d1625e /src/util/UriUtil.hxx | |
parent | d42c0f1dc5063d50a62817b63a1c2a4507c46071 (diff) | |
download | mpd-eab32f2e5d8114d08e392001f0004284267bebd5.tar.gz mpd-eab32f2e5d8114d08e392001f0004284267bebd5.tar.xz mpd-eab32f2e5d8114d08e392001f0004284267bebd5.zip |
util/UriUtil: add uri_get_suffix() overload that ignores query string
Diffstat (limited to 'src/util/UriUtil.hxx')
-rw-r--r-- | src/util/UriUtil.hxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/util/UriUtil.hxx b/src/util/UriUtil.hxx index c2cc97a63..d478d5b92 100644 --- a/src/util/UriUtil.hxx +++ b/src/util/UriUtil.hxx @@ -42,6 +42,17 @@ gcc_pure const char * uri_get_suffix(const char *uri); +struct UriSuffixBuffer { + char data[8]; +}; + +/** + * Returns the file name suffix, ignoring the query string. + */ +gcc_pure +const char * +uri_get_suffix(const char *uri, UriSuffixBuffer &buffer); + /** * Returns true if this is a safe "local" URI: * |