
Untitled
By: a guest on
Jun 9th, 2012 | syntax:
C# | size: 1.22 KB | hits: 34 | expires: Never
_log.AppendLine("Detecting keyword...");
string response = ReadResponse(CreateSimpleRequest("999999.9"));
string response2 = ReadResponse(CreateSimpleRequest("999999.9'"));
bool found = false;
for (int i = 0; i < response.Length && !found; i++)
{
string sub = "";
for (int n = i; n < response.Length && !found; n++)
{
char c = response[n];
if (!char.IsLetterOrDigit(c) && !char.IsPunctuation(c) && !char.IsSeparator(c) && !char.IsSymbol(c))
{
i += sub.Length;
break;
}
sub += c;
found = !response2.Contains(sub);
}
if (found)
_options.Keyword = sub;
}
if (!found)
_log.LastLine = "^FF0000Can not find keyword but let me do a try!";
}