You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

StringUtils.h 987B

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // Created by robin on 6/20/16.
  3. //
  4. #ifndef MIFARE_TOOLS_HEX_H
  5. #define MIFARE_TOOLS_HEX_H
  6. #include <string>
  7. #include <DBO/Result.h>
  8. class StringUtils
  9. {
  10. public:
  11. static const std::string hex;
  12. static std::string rawToHuman(unsigned char c);
  13. static std::string rawToHuman(char c);
  14. static std::string rawToHuman(unsigned short c);
  15. static std::string rawToHuman(short c);
  16. static std::string rawToHuman(unsigned int c);
  17. static std::string rawToHuman(int c);
  18. static std::string rawToHuman(unsigned long c);
  19. static std::string rawToHuman(long c);
  20. static std::string rawToHuman(const std::string& raw);
  21. static ResultString humanToRaw(const std::string& human);
  22. static std::string toLower(const std::string& str);
  23. static char toLower(char c);
  24. static std::string toUpper(const std::string& str);
  25. static char toUpper(char c);
  26. static std::string ensureSize(const std::string& data, int size);
  27. };
  28. #endif //MIFARE_TOOLS_HEX_H