RestfulUtilty.hpp 563 B

1234567891011121314151617181920212223242526
  1. #ifndef _SP_UTILITY_RESTFUL_HELPER_
  2. #define _SP_UTILITY_RESTFUL_HELPER_
  3. #include <iostream>
  4. #include <string>
  5. using namespace std;
  6. namespace Restful
  7. {
  8. namespace Utility
  9. {
  10. static void SplitFilePath(const std::string& absoluteFilePath, std::string& fileName, std::string& fileSuffix)
  11. {
  12. //TODO:
  13. string::size_type pos = absoluteFilePath.find_last_of("/\\") + 1;
  14. fileName = path.substr(pos, absoluteFilePath.length() - pos);
  15. fileSuffix = absoluteFilePath.substr(absoluteFilePath.find_last_of('.') + 1);
  16. }
  17. }
  18. #endif //_SP_UTILITY_RESTFUL_HELPER_