osh.h

My personal stdc++ replacement
git clone git://git.oshgnacknak.de/osh.h.git
Log | Files | Refs | README

file_content_as_buffer.cpp (360B)


      1 #include "osh.h"
      2 
      3 using namespace osh;
      4 
      5 int main() {
      6     StringBuffer sb = fileContentAsBuffer(__FILE__);
      7     auto destruct_sb = autoDestruct(sb);
      8 
      9     printp(sb, "\n");
     10     printp(sb, "void foo() {\n");
     11     printp(sb, "    println(\"Hallo Welt\");\n");
     12     printp(sb, "}\n");
     13 
     14     println(sb);
     15 
     16     return 0; 
     17 }
     18 
     19 #define OSH_H_IMPLEMENTATION
     20 #include "osh.h"