Updates
Updating required flags for uploading a song with metadata
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#ifndef CHECKS_H_
|
||||
#define CHECKS_H_
|
||||
|
||||
#include<algorithm>
|
||||
#include<cstdlib>
|
||||
#include<ctype.h>
|
||||
|
||||
namespace Utilities
|
||||
{
|
||||
class Checks
|
||||
{
|
||||
public:
|
||||
Checks() = delete;
|
||||
|
||||
static bool isNumber(const std::string &val)
|
||||
{
|
||||
return !val.empty() && std::find_if(val.begin(),
|
||||
val.end(), [](char c)
|
||||
{
|
||||
return !std::isdigit(c);
|
||||
}) == val.end();
|
||||
}
|
||||
private:
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -11,6 +11,15 @@ namespace Utilities
|
||||
public:
|
||||
Conversions();
|
||||
|
||||
|
||||
static void toLowerChar(char &c)
|
||||
{
|
||||
if (std::isalpha(c))
|
||||
{
|
||||
c = std::tolower(c);
|
||||
}
|
||||
}
|
||||
|
||||
void initializeValues();
|
||||
|
||||
template <typename T>
|
||||
|
||||
Reference in New Issue
Block a user