This commit is contained in:
Maurice Grönwoldt 2020-07-09 16:31:33 +02:00
commit 61482e8d4c
36 changed files with 325 additions and 122 deletions

View file

@ -3,11 +3,13 @@
//
#include "Logger.h"
#include "JuceHeader.h"
void VeNo::Logger::debugMessage (const std::string& message)
{
#ifdef DEBUG
std::cout << "\u001b[38;5;172m[DEBUG]\u001b[0m\t" << message << "\n";
DBG("\u001b[38;5;172m[DEBUG]\u001b[0m\t" + message + "\n");
#endif
}

View file

@ -0,0 +1,20 @@
//
// Created by Maurice on 08.07.2020.
//
#include "StringUtils.h"
std::vector<std::string> VeNo::StringUtils::split (std::string input, std::string separator)
{
std::vector<std::string> result;
std::string_view::size_type position, start = 0;
while (std::string_view::npos != (position = input.find (separator, start)))
{
result.push_back (input.substr (start, position - start));
start = position + separator.size ();
}
result.push_back (input.substr (start));
return result;
}

View file

@ -0,0 +1,22 @@
//
// Created by Maurice on 08.07.2020.
//
#ifndef VENO_STRINGUTILS_H
#define VENO_STRINGUTILS_H
#include <string>
#include <vector>
namespace VeNo
{
class StringUtils
{
public:
static std::vector<std::string> split (std::string input, std::string separator = " ");
};
}
#endif //VENO_STRINGUTILS_H