strop.h 689 B

123456789101112131415161718192021222324252627
  1. //
  2. // Created by xcbosa on 2023/1/31.
  3. //
  4. #include <string>
  5. #include <iostream>
  6. #include <sstream>
  7. #include <vector>
  8. #include <string.h>
  9. using namespace std;
  10. namespace xc {
  11. namespace utils {
  12. vector<string> split(const string& str, const string& delim);
  13. string replace_all(string& src, const string& old_value, const string& new_value);
  14. string fixStringTransfer(string& src);
  15. string& trim(string &s);
  16. string uppercase(string s);
  17. int to_int(string s, bool &isSuccess);
  18. int to_int(string s, int defaultValue);
  19. bool is_in(int value, int minIncluded, int maxExcluded);
  20. string create_uuid();
  21. } // xc
  22. } // utils