kima2/src/core/utils.h

19 lines
658 B
C
Raw Normal View History

#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
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);
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-09 08:31:38 +02:00
#endif