bool ParseString(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;
// extract the literal as whole looking for a
// space or closing paranthesis character
char ch;
int nEnd, nLen;
nLen = sBodyStruct.Length;
for (nEnd = 0; nEnd < nLen; nEnd++)
{
ch = sBodyStruct[nEnd];
if (ch == ' ' || ch == ')')
break;
}
if (nEnd > 0)
{
sString = sBodyStruct.Substring(0, nEnd);
sBodyStruct = sBodyStruct.Substring( nEnd );
}
return true;
}