mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 14:26:38 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
	
		
			404 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			404 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #ifndef OPENMW_COMPONENTS_MISC_PATHHELPERS_H
 | |
| #define OPENMW_COMPONENTS_MISC_PATHHELPERS_H
 | |
| 
 | |
| #include <string>
 | |
| 
 | |
| namespace Misc
 | |
| {
 | |
|     inline std::string_view getFileExtension(std::string_view file)
 | |
|     {
 | |
|         if (auto extPos = file.find_last_of('.'); extPos != std::string::npos)
 | |
|         {
 | |
|             file.remove_prefix(extPos + 1);
 | |
|             return file;
 | |
|         }
 | |
|         return {};
 | |
|     }
 | |
| }
 | |
| 
 | |
| #endif
 |