/* This file is part of the GVars3 Library. Copyright (C) 2005 The Authors This library is free software, see LICENSE file for details */ #include "gvars3/GStringUtil.h" using namespace std; namespace GVars3 { string UncommentString(string s) { //int n = s.find("//"); //return s.substr(0,n); int q=0; for(string::size_type n=0; n < s.size(); n++) { if(s[n] == '"') q = !q; if(s[n] == '/' && !q) { if(n < s.size() -1 && s[n+1] == '/') return s.substr(0, n); } } return s; }; vector ChopAndUnquoteString(string s) { vector v; string::size_type nPos=0; string::size_type nLength = s.length(); while(1) { string sTarget; char cDelim; // Get rid of leading whitespace: while((nPos