Browse Source

Add getString convenience method to core::file

Andrey Fidrya 10 years ago
parent
commit
9c209e55e0
1 changed files with 2 additions and 0 deletions
  1. 2 0
      oxygine/src/core/file.h

+ 2 - 0
oxygine/src/core/file.h

@@ -41,6 +41,8 @@ namespace oxygine
 
             const void* getData() const {if (data.empty()) return 0; return &data[0];}
             unsigned int getSize() const {return (unsigned int)data.size();}
+			
+			std::string getString() const {return std::string((char *)&data[0], size());}
 
             typedef std::vector<uchar> buff;
             buff data;