public TermInfoStrings Match (char [] buffer, int offset, int length, out int used)
{
foreach (byte [] bytes in map.Keys) {
for (int i = 0; i < bytes.Length && i < length; i++) {
if ((char) bytes [i] != buffer [offset + i])
break;
if (bytes.Length - 1 == i) {
used = bytes.Length;
return (TermInfoStrings) map [bytes];
}
}
}
used = 0;
return (TermInfoStrings) (-1);
}
}