remove refurbish operations for now
This commit is contained in:
parent
6402b6f025
commit
6952e6e893
1 changed files with 5 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
#include <algorithm>
|
//#include <algorithm>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <regex>
|
//#include <regex>
|
||||||
|
|
||||||
#include "morse.h"
|
#include "morse.h"
|
||||||
|
|
||||||
|
@ -66,6 +66,7 @@ static std::map<char, std::string> morseCode = {
|
||||||
{']', "-.--."}, // ] => <KN> [sic!]
|
{']', "-.--."}, // ] => <KN> [sic!]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
void refurbishMessage(std::string &msg)
|
void refurbishMessage(std::string &msg)
|
||||||
{
|
{
|
||||||
// Make the message all upper case
|
// Make the message all upper case
|
||||||
|
@ -87,10 +88,11 @@ void refurbishMessage(std::string &msg)
|
||||||
// Remove spaces, if there are too many of them
|
// Remove spaces, if there are too many of them
|
||||||
msg = std::regex_replace(msg, std::regex("(\\s+)"), " ");
|
msg = std::regex_replace(msg, std::regex("(\\s+)"), " ");
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
std::string messageToMorse(std::string &msg)
|
std::string messageToMorse(std::string &msg)
|
||||||
{
|
{
|
||||||
refurbishMessage(msg);
|
//refurbishMessage(msg);
|
||||||
|
|
||||||
std::string morseString {};
|
std::string morseString {};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue