123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- //
- // Created by robin on 6/20/16.
- //
-
- #ifndef MIFARE_TOOLS_HEX_H
- #define MIFARE_TOOLS_HEX_H
-
-
- #include <string>
- #include <libnfc_cpptools/Result.h>
-
- namespace LibNfc
- {
- namespace Utils
- {
-
- class StringUtils
- {
- public:
- static const std::string hex;
-
- static std::string rawToHuman(uint8_t c);
- static std::string rawToHuman(int8_t c);
- static std::string rawToHuman(uint16_t c);
- static std::string rawToHuman(int16_t c);
- static std::string rawToHuman(uint32_t c);
- static std::string rawToHuman(int32_t c);
- static std::string rawToHuman(uint64_t c);
- static std::string rawToHuman(int64_t c);
- static std::string rawToHuman(const std::string& raw);
-
- static ResultString humanToRaw(const std::string& human);
-
- static std::string toLower(const std::string& str);
- static char toLower(char c);
-
- static std::string toUpper(const std::string& str);
- static char toUpper(char c);
-
- static std::string ensureSize(const std::string& data, int size);
-
- static std::string ltrim(const std::string& s);
- static std::string rtrim(const std::string& s);
- static std::string trim(const std::string& s);
- static std::string removeSpaces(const std::string& s);
- };
-
- }; // Utils
- }; // LibNfc
-
- #endif //MIFARE_TOOLS_HEX_H
|