StringHelper.h 469 B

12345678910111213141516171819202122232425
  1. /*
  2. * StringHelper.h
  3. *
  4. * Created on: 2024年7月19日
  5. * Author: m
  6. */
  7. #ifndef JNI_INCLUDE_UTILS_STRINGHELPER_H_
  8. #define JNI_INCLUDE_UTILS_STRINGHELPER_H_
  9. #include <algorithm>
  10. #include <cctype>
  11. #include <string>
  12. class StringHelper {
  13. public:
  14. static void toLowerCase(std::string& str) {
  15. std::transform(str.begin(), str.end(), str.begin(),
  16. [](unsigned char c) { return std::tolower(c); });
  17. }
  18. };
  19. #endif /* JNI_INCLUDE_UTILS_STRINGHELPER_H_ */