bool ParseQuotedString(ref string sBodyStruct, ref string sString)
{
sString = "";
// remove any spaces at the beginning and the end
sBodyStruct = sBodyStruct.Trim();
// check if this is NIL
if (IsNilString(ref sBodyStruct))
return true;;
if (sBodyStruct[0] == '"')
{
// extract the part within quotes
char ch;
int nEnd;
for (nEnd = 1; (ch = sBodyStruct[nEnd]) != '"'; nEnd++)
{
if (ch == '\\')
nEnd++;
}
sString = sBodyStruct.Substring( 1, nEnd-1 );
sBodyStruct = sBodyStruct.Substring( nEnd+1 );
return true;
}
string sLog = "InValid Body Structure " + sBodyStruct + ".";
Log( LogTypeEnum.ERROR, sLog);
return false;
}