util.cc (265B)
1 #include "util.hh" 2 3 #include <vector> 4 #include <string> 5 6 char* 7 convert_new(const ::std::string& s) 8 { 9 char* raw = new char[s.size() + 1]; 10 ::std::strcpy(raw, s.c_str()); 11 return raw; 12 } 13 14 const char* 15 convert(const ::std::string& s) 16 { 17 return s.c_str(); 18 }