2018-08-02 13:06:37 +02:00
|
|
|
#ifndef UTILS_H
|
|
|
|
#define UTILS_H
|
|
|
|
|
2018-08-15 10:51:57 +02:00
|
|
|
#include "posprinter.h"
|
|
|
|
|
2018-08-09 08:31:38 +02:00
|
|
|
#include <locale>
|
2018-08-15 10:51:57 +02:00
|
|
|
#include <optional>
|
|
|
|
#include <string>
|
2018-08-08 15:55:35 +02:00
|
|
|
|
2018-08-02 13:06:37 +02:00
|
|
|
std::string formatCentAsEuroString(const int cent, int width = 10);
|
2018-08-15 10:51:57 +02:00
|
|
|
std::optional<PrinterDevice> convertToPosPrinterDevice(const std::string& vendor,
|
|
|
|
const std::string& endpoint);
|
2019-02-25 08:57:10 +01:00
|
|
|
std::string& ltrim(std::string& str, const std::string& chars = "\t\n\v\f\r ");
|
|
|
|
std::string& rtrim(std::string& str, const std::string& chars = "\t\n\v\f\r ");
|
|
|
|
std::string& trim(std::string& str, const std::string& chars = "\t\n\v\f\r ");
|
2019-09-26 16:41:39 +02:00
|
|
|
bool case_insensitive_match(std::string s1, std::string s2);
|
2018-08-02 13:06:37 +02:00
|
|
|
|
2018-08-09 08:31:38 +02:00
|
|
|
#endif
|