actions: implement filtering playlist on priorities
This commit is contained in:
@@ -33,13 +33,13 @@ long stringToLongInt(const std::string &s)
|
||||
return atol(s.c_str());
|
||||
}
|
||||
|
||||
bool isInteger(const char *s)
|
||||
bool isInteger(const char *s, bool accept_signed)
|
||||
{
|
||||
assert(s);
|
||||
if (*s == '\0')
|
||||
return false;
|
||||
for (const char *it = s; *it != '\0'; ++it)
|
||||
if (!isdigit(*it) && (it != s || *it != '-'))
|
||||
if (!(isdigit(*it) || (accept_signed && it == s && *it == '-')))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ template <size_t N> struct print<N, std::wstring> {
|
||||
|
||||
int stringToInt(const std::string &s);
|
||||
long stringToLongInt(const std::string &s);
|
||||
bool isInteger(const char *s);
|
||||
bool isInteger(const char *s, bool accept_signed);
|
||||
|
||||
std::string ToString(const std::wstring &ws);
|
||||
std::wstring ToWString(const std::string &s);
|
||||
|
||||
Reference in New Issue
Block a user