private GetNextQuotedString ( string s, int &pos ) : string | ||
s | string | String to be searched |
pos | int | Start position |
return | string |
private string GetNextQuotedString(string s, ref int pos)
{
string rv = string.Empty;
int ns = s.IndexOf('\"', pos);
if (ns != -1)
{
int nb = s.IndexOf('}', pos);
if (nb == -1 || nb > ns)
{
int ne = s.IndexOf('\"', ns + 1);
if (ne != -1)
{
rv = s.Substring(ns + 1, ne - ns - 1);
pos = ne + 1; // after ":
}
}
}
return rv;
}