yvt 4e566cc671
Update CP437
- Replace `std::map` with `std::unordered_map`
- clang-format
- Delete `CP437`'s default copy constructor instead of hiding it
- Move the internal declarations to an anonymous namespace
2019-07-23 22:20:19 +09:00

23 lines
452 B
C++

/*
* Copyright (c) 2013 yvt
* WTFPL
*/
#include <cstdint>
#include <string>
#include <Core/Math.h>
namespace spades {
class CP437 {
CP437() = delete;
~CP437() = delete;
public:
static char EncodeChar(std::uint32_t unicode, char fallback = 0xff);
static std::uint32_t DecodeChar(char c);
static std::string Encode(const std::string &, char fallback = 0xff);
static std::string Decode(const std::string &);
};
} // namespace spades