playlist/cue/Parser: use Split()

This commit is contained in:
Max Kellermann 2022-10-15 08:33:47 +02:00
parent ced6a5ae07
commit 1429d6bfb9
1 changed files with 4 additions and 4 deletions

View File

@ -20,6 +20,7 @@
#include "CueParser.hxx"
#include "tag/ParseName.hxx"
#include "util/CharUtil.hxx"
#include "util/StringSplit.hxx"
#include "util/StringStrip.hxx"
#include <algorithm>
@ -43,13 +44,12 @@ cue_next_word(std::string_view &src) noexcept
static std::string_view
cue_next_quoted(std::string_view &src) noexcept
{
auto end = src.find('"');
if (end == src.npos)
auto [value, rest] = Split(src, '"');
if (rest.data() == nullptr)
/* syntax error - ignore it silently */
return std::exchange(src, {});
auto value = src.substr(0, end);
src = src.substr(end + 1);
src = rest;
return value;
}