strop.h 639 B

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