WIP
This commit is contained in:
parent
3fda15966c
commit
61482e8d4c
36 changed files with 325 additions and 122 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
20
Source/Veno/Utils/StringUtils.cpp
Normal file
20
Source/Veno/Utils/StringUtils.cpp
Normal 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;
|
||||
}
|
||||
22
Source/Veno/Utils/StringUtils.h
Normal file
22
Source/Veno/Utils/StringUtils.h
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue